The SQL Editor is the place to create, test and examine your SQL statements. There are some additional features made for your easier life. Of course you can customize editor behavior in Preferences.
It's strongly recommended not to mix transactions started in the SQL Editor and in the Data Viewer. You can get some ugly collisions.
Run Current Statement
F9
Ctrl+Return
The current SQL statement is run.
Explain Query Plan
F6
The current SQL statement is run, preceded by EXPLAIN QUERY PLAN. This will show a table of the high level operations which would be run by sqlite to execute the statement.
Explain
F6
The current SQL statement is run, preceded by EXPLAIN. This will show a table of the low level operations which would be run by sqlite to execute the statement.
Run Multiple Statements
F6
Everything from the current SQL statement to the end of the whole script is run as a sequence of SQL statements.
This "Start from cursor" feature is useful when your script contains an error. You can continue after correction from the middle of the script.
Create View
Create a view. The Create View Dialog will be shown with the tab chosen and the SQL panel filled with the selected text, or if there is no selected text the current SQL statement.
New Document
Create a new empty document in the editor. If there are any unsaved changes you will be asked if you want to save them first.
Open Document
Load an existing file into the editor. If there are any unsaved changes you will be asked if you want to save them first. Then the file selection dialog will be shown, and the selected file will be loaded into the SQL editor.
Save Document
Save the current file. If the document was new and not loaded from a file, the Save As dialog is shown. If the document was loaded from a file, it is saved back into that file.
Save Document As
The Save As dialog is shown to select the name of a file into which the document is then saved (unless you cancel the dialog).
Search in the SQL file
Ctrl
+
F
Open or close the Search panel in the bottom of the SQL Editor.
Open or close the History panel to the right of the SQL Editor. This shows a list of recently executed SQL statements. The intention is to allow selection of a statement to repeat, but this is not yet implemented.