The functions of both editors are almost identical. The SQL Worksheet is used for unique executing of SQL statements during a database session and the SQL Script Editor for developing and storing of SQL scripts. The Script Editor is by default associated with files with the "SQL" extension that can be stored in your Toad Extension project.
In both editors you can execute any valid database statement. Results of the SELECT statements are displayed in a table below.
To execute SQL code
» | Click a row with the SQL code and click the Execute SQL Statement icon or press CTRL+Enter. |
Multiple statements can be selected and executed together as a script (in this case results of the SELECT statements won’t be shown in the table).
Begin/End blocks are required only in case of PL/SQL statements and the individual statements shall be separated by a semicolon (;) or an empty line.
All executed statements can be logged in the SQL Monitor.
On the toolbar you have the possibility to easily switch between any open connections. When you switch between the connections, the content of the editor remains preserved and therefore can be executed comfortably in a number of different connections.
You can select database objects comfortably - object details with descriptions open in a popup window.
When running certain Oracle dbms_xplan commands on generated SQL scripts, the result columns allignment may get offset due to use of proportional / non-monospaced font in the result section. Therefore you must set a monospace font (e.g. Courier New) for the querry result. See the screenshots.
Columns alignment with a proportional font used.
A monospace font setting.
Columns alignment with a monospace font used.
You can take advantage of predefined SQL Templates. See the topic SQL Templates for more information.
To display a quick analysis of SQL statements, the execution plan (EXPLAIN PLAN) is integrated. It can track the performance of the statements.
For the analysis of the program, the PL / SQL Profiler has been integrated. This feature analyzes the execution times and the frequency of execution of individual statements in stored procedures and triggers.
You can select part of your SQL code in SQL Worksheet, right click the selection and choose
Make Code Statement or Strip Code Statement item from popup menu.
Your selected part of SQL code will either be copied to Clipboard or change immediately.
Output format and other options can be specified in Preferences in section Toad Extension | Code Assist.
Related Topics- see Project | Syntax Check