SQL Editor
The SQL Editor allows you to run queries on your Hydra databases directly from the Hydra dashboard.
To use the SQL Editor:
- Navigate to the Hydra Dashboard.
- Select your project.
- Select SQL Editor.
- Enter a query into the editor and click the green triangle to execute and view the results.
Example Query
You can use the following queries to try the SQL Editor. The queries creates a table, adds data, and retrieves the data from the table.
Run each statement by clicking the green triangle next to each query.
SELECT * FROM "Company"
. Postgres changes identifier names to lower case unless they are quoted. The same applies when creating objects in Postgres. For example, CREATE TABLE DEPARTMENT(id INT)
creates a table named department
in Postgres. For more information about how quoted and unquoted identifiers are treated by Postgres, see Identifiers and Key Words in the PostgreSQL documentation.Save Queries
The SQL Editor allows you to save your queries.
To save a query:
- Enter the query into the editor.
- Enter a name for the query at the top of the page.
- Click Save Query to save the query.
The query is added to the Saved Queries list in the left pane of the SQL Editor. You can fetch a previously saved query by selecting it from the list.
You can rename a query at any time by modifying the name and clicking Save Query.
You can delete or duplicate a saved query by selecting the action from the options menu associated with the saved query.
To clear the editor, click New Query.