Executing SQL Scripts


TOAD allows you to execute SQL and SQL scripts as scripts. This will display the output of the script in the Script Output tab in the results panel; see Figure 3.35. This might be convenient when working with scripts so you don't have to exit the TOAD environment to run scripts in SQL*Plus, for example.

Figure 3.35. Executing a SQL statement as a script.

F5 executes the current SQL statement as a script.

The script output gives you the output that the script will produce, not just the data. Figure 3.36 shows a short SQL*Plus script and its output with column headings. SQL*Plus compatibility with TOAD is discussed later in this chapter.

Figure 3.36. Executing a SQL*Plus SQL script as a script.

If there are any syntax errors, TOAD will highlight the syntax problem in the SQL text and display the Oracle error across the bottom of the output area.



TOAD Handbook
TOAD Handbook (2nd Edition)
ISBN: 0321649109
EAN: 2147483647
Year: 2003
Pages: 171

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net