
Start SQL Console
Open the SQL Console from the File menu, via the shortcut (Command-R) or from the Database Information Panel.
Choose your database connection from the connection sheet. If you want to change your connection details for this query only click on the arrow. The connection details are displayed.
Click on "Connect" to establish the database connection.
The status line (on top of the window) displays "Status: Idle." and the gray result area contains the connection details after successfully connecting to the database server. Otherwise the error messages are displayed in the Message Viewer.

Enter and execute your SQL Script
Enter your SQL commands in the white SQL input area. The gray area displays the script results on execution. If you want to enter more than one command, separate you commands with a semicolon (;). To add comments start a line with a number sign (#).
To execute your script select the appropriate command from the Run popup menu or press ENTER. (Keep in mind that the enter key is located on the numeric keypad. The RETURN key does not start command execution.)
Features available in SQL Console
| Syntax Coloring |
Display ANSI SQL92 commands, strings and comments in
different colors to make scripts and command easier to
read and understand.
Turn this option on/off with Options - SQL Syntax Coloring. |
|
| Auto-Completion |
Displays a selection dialog for table and field names
in SELECT, INSERT, UPDATE and DELETE commands. You can
navigate with the cursor keys (up, down, page up, page
down) through the selection list. To select a table or
field name press tab, to close the completion dialog
press escape (or simply ignore the dialog and keep on
typing).
The auto-completion dialog displays tables available for your user/database you have specified with the New Connection Assistant. To select field names you have to select a table name first and then enter a dot to open the field list for the specified table. Turn this option on/off with Options - Table/Field Auto-Completion. |
|
| Query Favorites |
Save your script or command to the Query Favorites with
Save - Save SQL Script to Favorites. You can Organize
your scripts in the Favorites Panel.
To display the Favorites Panel select Organize Favorites from the Favorites Menu. To execute a saved Favorite simply drag the saved entry to the SQL Console or the SQL Viewer. |
|
| Save to File | Save your query or command as simple SQL script file with Save - Save SQL Script to File. | |
| Load from File | Load your query or command from any text file containing SQL commands with Load. | |
| Execute Selection |
Runs only the selected part of a SQL script instead of
the complete Script.
Execute Selection with Run - Execute Selection. |
|
| Execute Query to Pasteboard |
Run your query and automatically export the results to
the clipboard in tab-delimited format. This format can
be processed by MS Word (creates a Word table), MS
Excel (automatically converts every result value in an
Excel field) and many other applications.
Execute your query to the clipboard with Run - Execute SQL Script to Pasteboard or Run - Execute Selection to Pasteboard. |
Special Note
SQL Console is compatible with the SQL script format of many database vendors. You can use SQL Console to run Oracle and MS SQL Server SQL scripts as well as MySQL dump files (which are in fact SQL commands which re-create the original table structure including data).