Query with Neon's SQL Editor
To use the SQL Editor:
- Navigate to the Neon console.
- On the Dashboard tab, select your project from project drop-down list.
- Select the SQL Editor tab.
- Enter a query into the editor and click Run to view the results.
You can use the following queries to try the SQL Editor:
CREATE TABLE t (c int); INSERT INTO t SELECT generate_series(1,100); SELECT count(*) FROM t;
Note: Running multiple query statements at once returns a separate result set for each statement. The result sets are displayed in separate tabs, numbered in order of execution.
To clear the editor, click New Query.
The SQL Editor allows you to save your queries.
To save a query:
- Enter the query into the editor.
- Click Save to open the SAVE QUERY dialog.
- Enter a name for the query and click Save.
The query is added to the Saved list in the left pane of the SQL Editor. You can rerun a query by selecting it from the Saved list.
You can rename or delete a saved query by selecting Rename or Delete from the the kebab menu associated with the saved query.
Viewing the query history
The SQL Editor maintains a query history for the project. To view your query history, select History in the left pane of the SQL Editor.