SQL Editor

The SQL editor is where you write and run queries. It runs against the connection and database you have open.

Query tabs

Open a new query tab with the + button next to your tabs, or with the new-tab shortcut (Alt T on web, ⌘ T on desktop). Each tab keeps its own SQL while you switch between tables and other tabs.

Close a tab with Alt W (web) or ⌘ W (desktop).

Run a query

Press Alt Enter (web) or ⌘ Enter (desktop), or click Run.

  • With text selected, DBO Studio runs only the selection.
  • With nothing selected, it runs the whole editor.

Results appear in a grid below the editor. Press Esc or click Stop to cancel a long-running query.

If the connection has Safe Mode on, DBO Studio may ask you to confirm or enter your Safe Mode password before the query runs.

Autocomplete

As you type, the editor suggests keywords, schemas, tables, and columns from the open connection. When an AI provider is set up, it can also suggest the rest of a line inline. Press Tab to accept.

Format

Beautify formats the SQL with consistent indentation and casing. Minify puts it on as few lines as possible. Beautify also has a shortcut: Alt ⇧ F (web) or ⌘ ⇧ F (desktop).

Ask the AI about SQL

Select part of a query and right-click:

  • Explain selection describes what the SQL does.
  • Fix selection suggests a corrected version, for example after an error.

AI Explain in the action bar explains the whole query. These need an AI provider. See AI assistant.

Save queries

Click Save in the action bar to keep a query. Saved queries appear under Queries in the left sidebar. Click one to open it in the editor.

Saved queries belong to you. On a shared server, other users do not see them.

History

Every query you run is recorded under History in the left sidebar, newest first. Click an entry to open it again. You can clear the history from the same panel.

Export results

Click Export to save the result of the current query as CSV, JSON, or SQL INSERT statements. Large exports run in the background and you can download the file when it is ready.

Previous

Connections

Next

Data Grid