- Overview
- Predefined Shortcuts
- User-Defined Shortcuts
- Using Variables
- Table and Column Name Select Lists
- Using Aliases and Autoreplacement Substitutions
- SQL Templates
- Code Completion Templates
- Executing SQL Statements
- Executing SQL Scripts
- Editing Result-Set Data
- Saving Result-Set Data
- Printing Result-Set Data
- Examining Explain Plans
- Examining Basic Performance Info
- Using Auto Trace
- SQL*Plus Compatibility
- Scripts That Write Scripts
- Summary
Executing SQL Statements
TOAD not only enables you to easily edit and create SQL and scripts containing SQL, but also to execute the SQL, review explain plans, and examine, edit, or change the result-set data.
The easiest way to execute SQL is with the Execute SQL button, the leftmost button on the middle toolbar. This executes the statement and returns the data when in full-view mode. Remember that F6 toggles between just the SQL Editor window and the results panel.
F9 executes all of the SQL statements in the SQL window, as does the Execute SQL All menu option, as in Figure 3.34. Shift-F9 executes the SQL statement at the cursor, or the SQL statement that is highlighted.
Figure 3.34Executing SQL statements.
Shift-F9 executes the current SQL statement.
TIP
If you are working with SQL in a script, highlight the SQL in the script and press F9 to execute the single SQL statement only.