Editor: Custom SQL queries
Learn how to execute custom SQL queries for your databases.
Show and hide the editor
Open the SQL editor when viewing a database by clicking on the SQL button next to the search field:
Note that only database owners can open the SQL editor for now. This means that if you invite others to your database they will not be able to see that button to open the editor. This is to protect your database from unwanted modifications with clever queries.
To close the SQL editor again and get the search field back click on the X in the top right corner:
Executing queries
There are no restrictions on the queries you can execute. After executing a query it will display the summary in the bottom left of the editor and the resulting rows (for select queries) down below. The result set is not editable.
Queries can not be interrupted or canceled yet but if you are stuck on a forever-loading qeuery then after browser page reload you can use the field again.
SQL queries in the history
All SQL queries that are not SELECT queries are saved to the database history and can be viewed in the history popup.
While the history for the normal table view shows in detail which rows were updated and with which values, the history can not show this information for the SQL queries - but it does show the number of affected rows.