SQL Query Editor
Run SELECT queries directly against your database from the Studio dashboard.
SQL Query Editor
The SQL Query Editor lets you run raw SQL queries against your connected database and view the results in a data grid — all from within the Studio dashboard.
Opening the Editor
- Navigate to the Database panel in the sidebar
- Click the SQL Query tab at the top
Writing Queries
Type your SQL query in the editor:
Click Run or press the button to execute.
Results
Results appear in a data grid below the editor with the same formatting as the Database Browser:
- Row numbers
- Colour-coded cell values (NULL, boolean, number, date, string)
- Horizontal scrolling for wide result sets
The execution time appears next to the Run button:
Read-Only Mode
The SQL Query Editor is read-only. Only the following statement types are allowed:
SELECTWITH(CTEs)PRAGMA(SQLite)SHOW(MySQL)DESCRIBE(MySQL)EXPLAIN
Attempting to run INSERT, UPDATE, DELETE, DROP, or CREATE statements returns an error:
This protects your development database from accidental modifications.
Error Display
If your query has a syntax error or references a non-existent table, the error is shown in red below the editor:
Example Queries
Count rows by role:
Join tables:
SQLite PRAGMA:
Find recent activity:
Clear Button
Click Clear to reset both the query input and the results panel.