Run SQL is a tool that allows you to write SQL statements and execute
them against the database. It is very easy to use and is quickly accessible.
It does not use the elements that allow you to visually generate SQL statements
like SQL Query Builder. Instead,
it executes ready-to-run statements and creates views using them. To open
the Run SQL tool, press the Run window on the toolbar:
... a window will be displayed, like on the picture below. You write
the SQL statements in the text box and execute them against the data source
by pressing the Run button.
Executing multiple SQL statements
can combine more than one statement by separating each statement with
the keyword GO on a new line. For example, the program will split SQL
statement below into two separate commands. The first line will be executed
first and the NewCustomers table will be deleted. After that, SELECT INTO
statement will create a new table and copy all records from the Customers
Creating a view using specified SQL statement
If you write an SQL statement that you would like to save as a view
in a database, you can select the 'Create a view using this SQL statement'
check box. The program will prompt you for a name of the view and after
you press OK it will create the view in the database using the SQL statement
you specified in the Run SQL window.
Previous SQL Statements
Previous SQL Statements drop down list at the top of the window contains
last 10 executed SQL statements. It can save your time by inserting a
ready-to-use SQL statement at the cursor position in the text box. The
lenght of the SQL statement must be less than 5000 characters in order
to be saved to the list.
How to dock the Run SQL window
The Run SQL window is dockable and it can be arranged like on the picture
below. When you reopen the program it will remember the layout of the
main window and display the Run SQL tool.
About SQL Query Builder
Execute SQL Query tool