Saving Queries#
To save your query, click on the save icon in the tool bar (near lightning bolt) ->
Alternatively, you could click on file → save script as
To create a new query tab, click on the new file icon (1) on the top left
Important Notes About Running Queries
End each SQL statement with a semicolon (;). This tells SQL that the current statement is complete.
When you run a script, MySQL Workbench only executes the statement your cursor is currently inside (or the text you have highlighted).
If your cursor is on the second line, only that statement will run, not the entire file.
To run all queries in the file, highlight them all first, then click the Execute button (⚡).
For this project, you can do all the learning queries in 1 tab if you’d like, however, do the exercises in separate tabs where stated.