If there are multiple queries in the Editor window and would like to run just one of them, place the cursor on the line of the query to be run. Click F9 or the Execute Statement icon on the toolbar to run at the cursor.
Another option would be to use <shift>F9 or configure your toolbar to include the Execute at cursor icon. For more information about configuring your toolbar please see solution 17527.
https://support.quest.com/SUPPORT/index?page=solution&id=SOL17527When executing with F9, make sure to have a semicolon at the end. If semicolons are not used, use <shift>F9 to execute.
Below is more detailed information about executing queries from the Help file.
Executing Statements
Toad supports query statements, DDL statements, blocks of procedure SQL, and so on.
In addition, Toad recognizes substitution variables in quotes as follows:
. If & is escaped, Toad will not prompt for a value.
. If & is the last character in a string, it is not considered a substitution variable.
Commands to execute code
<F9>
Pressing <F9> runs the statement at the cursor, or compiles the PL/SQL at the cursor. This does not include the contents of the entire window, unless the entire window contains only the statement or script at the cursor.
To execute the statement at the cursor
. Press <F9>.
Or
Click the Execute Statement button on the toolbar.
To process a portion of the editor text
. Highlight that portion and press <F9>.
Or
Click the Execute Statement button on the toolbar.
<SHIFT><F9>
Pressing <SHIFT><F9> runs only the snippet at the cursor. This does not run or compile entire procedures, functions, or triggers. When you press <SHIFT><F9> Toad runs everything between two of the following:
. ; (a semi-colon)
. a blank line
. / (a forward slash)
. End and beginning of file indicators
To execute a single statement among many statements (separated by at least one blank line)
1. Click or place the caret/cursor within the statement, or on the blank line after the statement you want to execute.
2. Press <SHIFT><F9>, or <CTRL><ENTER>.
Or
Click the Run Current Statement button on the toolbar.
Highlighting SQL Snippets
You can easily highlight bits of code so that an explain plan is run on only that code, or so that you can see what Toad is including as a part of the statement before you Execute it. Highlighting code uses the same logic as <SHIFT><F9>.
To highlight a SQL Snippet
. Place your cursor in the code you want to highlight and then press <CTRL><H>.