The IBConsole isql Window
The IBConsole isql Window permits you to execute DDL and DML commands to the InterBase server as well as to load, save, print, cut, paste, and copy SQL scripts and results.
To display the isql window:
Input Area
The SQL input area is where you can type SQL statements or scripts to be executed. The SQL input area accepts multiple statements, although only one can be executed at a time. Each statement entered in the SQL input area must be terminated by a semicolon (;). An uncommented statement that holds the mouse cursor is called the current statement.
Output Area
The SQL output area is where the results of the SQL statements or scripts are displayed. It scrolls both horizontally and vertically. The SQL output area contains two tabs:
- The Data tab displays any data returned by the SQL output in a grid format.
- The Plan tab displays the plan for the SQL statement or script.
- The Statistics tab displays statistics for the SQL output, including: execution time, prepare time, starting memory, delta memory, current memory, number of buffers, number of reads, number of writes, the plan, and the number of records fetched.
- The Errors tab displays any errors during execution.
Status Bar
The status bar at the bottom of the SQL input area displays information relevant to the SQL input areas such as cursor position, input status, client dialect, and transaction status. You can change the client dialect by right clicking on the status bar.
Menu Bar
File Menu
The File menu contains the following entries:
Print
prints the current contents of the SQL input area.Save
saves the stack of SQL commands from the current session to a file.Load
loads a saved SQL history file.Close
closes the SQL Editor.
Edit Menu
The Edit menu contains the following entries:
Undo
,Cut
, andPaste
are for use in the SQL input area only. “Undo” in the Edit menu does not undo database changes. Use Transactions|Rollback to undo database changes.Copy
,Select All
, andFind
are for use in both the input and output area.Font
specifies the font to be used in the input areaOptions
are described on the page Options Tab. They include settings for query plan, auto commit, Blobs, and terminators.Highlight Options
allows you to set the appearance of text in the input area.
Query Menu
The Query menu contains the following entries:
Load Script
loads a SQL script fileSave Script
saves a SQL script fileNext
steps you forward to the next SQL statement after you have used the Previous command to display earlier statements in the stack.Previous
displays the previous statement that you entered in the input area. This command can be used repeatedly to step through the stack of statements entered during the current interactive SQL session.Execute
executes the SQL statements currently displayed in the input area.- Execute Selection executes the selected portion of the SQL statement displayed.
Fetch All
forces the IBConsole to fetch all the rows of a subquery rather than a subset. Rarely needed, because IBConsole fetches the results as you scroll down in the output area.Prepare
displays the optimization plan in the SQL output area.- Cancel exits the optimization plan.
Save Output
saves the contents of the output area to a text file.- Wizard opens the Query Wizard where you can create query scripts.
Database Menu
The Database menu contains the following entries:
Connect As
allows you to connect to the database as a different user.New Connection
is active only when you are not connected to a database. It displays the Database Connect dialog.Create Database
andDrop Database
are exactly the same as the equivalent commands in the main IBConsoleDatabase
menu. They are provided in the SQL EditorDatabase
menu for convenience.
Transactions Menu
The Transactions menu allows you to {Code|commit}} or {Code|roll back}} transactions.
Windows Menu
Clicking the Windows menu displays a list of current open windows. You can display a window by highlighting it in the list and clicking Switch to or by double-clicking the entry.
isql Toolbar
The IBConsole SQL Editor toolbar contains the following buttons:
Button | Description |
---|---|
Displays the previous statement that you entered in the input area. This button can be used repeatedly to step through the stack of statements entered during the current interactive SQL session. The accelerator key is | |
Steps you forward to the next SQL statement after you have used the Previous command to display earlier statements in the stack. The accelerator key is | |
Executes the current statement or script in the SQL input area. The output is displayed in the SQL output area. The accelerator key is | |
Displays the query plan for the current query in the SQL output area. (Same as Query>Prepare.) | |
Forces IBConsole to fetch all the rows of a subquery rather than a subset. Rarely needed, because IBConsole fetches the results as you scroll down in the output area. (Same as Query>Fetch All.) | |
Commits the transaction specified by the SQL statement to the database. (Same as Transactions>Commit.) | |
Rolls back all database changes since the last commit. (Same as Transactions>Rollback.) | |
Loads a script for SQL execution into the SQL input area. (Same as Query>Load Script.) | |
Saves SQL statements entered in the SQL input area to a file. (Same as Query>Save Script.) | |
Finds text in the SQL input area. (Same as Edit>Find.) | |
Displays a list of current open windows. You can display a window by highlighting it in the list and clicking Switch To or by double-clicking the entry. You can also change windows by clicking the down arrow and clicking the window you want from the drop-down list. | |
Prints the contents of the SQL input area. |