Working with Queries and Scripts
The SQL Query window in Teratrax Database Manager is a powerful graphical
query tool designed to help you work with Structured Query Language (SQL)
queries and scripts in an easy and efficient way. The SQL Query window
allows you to:
The user interface is composed of multiple panes. The Editor pane
is a text editor where you can enter SQL statements. The Results pane
displays the returned recordset. The Errors pane displays error
messages. If the SQL batches in the Editor pane return more than one
recordset, a list of all returned recordsets will be made visible in the
Recordsets pane. The Recordsets pane will not be displayed if your SQL
batches return a single recordset. The moving Splitter separates the Editor
pane from the rest of the panes. Click a pane to make it the active pane.
Alternatively, press F6 to move between panes.
The Results pane displays the columns and rows from a table or query in a
grid. You can modify the data in the grid. You can also insert and delete
rows. If more than one recordset is returned, some of the recordsets may be
returned as read only for performance purposes. The Recordsets pane will
display the status of all recordsets as either "Read Only" or "Live".
Usually the first recordset in the batch is live.
Editor Pane
You can execute a complete script or only selected SQL statements in the
SQL Query window. To execute a complete script, create or open the script in
the Editor pane and press F5. To execute only selected SQL statements,
highlight the lines of code in the Editor pane and press F5. Click on
Working with SQL Batches and Statements for more
information on the Results pane.
Status Bar Information
Teratrax Database Manager provides information about activity and
connections in the status bar of the SQL Query window. The status bar is
composed of the following boxes (from left to right):
- Status of the current operation, including
number of successful and unsuccessful batch.
- Duration of last query.
- Current user and server process identifier
(ID).
- Name of the current database server with
version information, number of CPUs, and available memory.
- Insert/Overwrite mode setting: displays "OVR"
for overwrite mode and INS for insert mode.
- CAPS lock setting: displays "CAP" when on.
Results Pane
The Results pane consists of the data grid. The number of rows returned
is displayed on the pane's caption. The current position of the insert
cursor in the window is shown in the current grid cell. On the left side,
the grid has a marker that marks the position of the current row. Click on
Working with Results (Results Grid) for more
information on the Results pane.
Keyboard Shortcuts
You can select any menu option in SQL Query window by simply holding the
Alt key and pressing the appropriate menu shortcut (for example, Alt+F for
the File menu). Additionally, you can access some of the most common
features directly through keyboard shortcuts. This table displays all the
keyboard shortcuts available:
|
Keyboard Shortcut |
Description |
|
F1 |
Displays help |
|
F5 |
Executes query |
|
Ctrl+F5 |
Checks query syntax |
|
Ctrl+O |
Opens a SQL file |
|
Ctrl+S |
Saves SQL script in a file |
|
Ctrl+N |
Starts a new SQL window by cloning the current connection |
|
Ctrl+F |
Opens the search dialog box |
|
Ctrl+C |
Copies select text to the clipboard |
|
Ctrl+X |
Cuts selected text and stores it in the clipboard |
|
Ctrl+V |
Pastes text from the clipboard |
|
Ctrl+Z |
Reverts the last text operation |
|
Ctrl+Y |
Re-establish the last text operation |
|
Ctrl+A |
Select all text in Editor pane |
|
Ctrl+Del |
Delete the current row from the grid |
|
Ctrl+Ins |
Insert a row in the grid |
|
Ins |
Inserts a row in grid if you are working with the grid. Toggles Editor's
Insert/Overwrite mode if you are working with the Editor pane |
|
F6 |
Move between panes |
Related Links
Syntax Highlighting, Parameter Hinting, and
Code Completion
Working with SQL Batches and Statements
Working with Results (Results Grid)
|