Run Part of a Query¶
Run a selected piece of the SQL, or one statement out of several, while the rest of the editor stays as it is.
Related
- Concept: Query Editor for how the editor splits statements and marks what runs.
- Run a Query for the whole flow.
Permission Required
Running a query needs the Author team permission or higher on every datastore the query reads. Users with the Admin role can run queries on any datastore.
Step 1: Select the SQL to run in the editor. The button changes to Run selection .
Step 2: Click Run selection , or press Cmd+EnterCtrl+Enter.
Only the selected text runs.
Step 1: Make sure each statement in the editor ends with ;.
Step 2: Click anywhere inside the statement to run, with no text selected. A bar beside the line numbers marks the lines that Run sends.
Step 3: Click Run , or press Cmd+EnterCtrl+Enter.
Only that statement runs. A green bar beside the line numbers marks the lines that ran.
Which statement runs
- With the cursor on a blank line, or right after a
;, Run sends the statement before it, unless another statement starts later on the same line. - When the editor holds a single statement, Run sends all of it.
- When the editor is minimized, Run sends the whole SQL.