Thursday, December 20, 2007

TOAD SQL Editor

The SQL Editor is the original development area of TOAD. This window enables you to type, save, run, and tune SQL statements. In addition, you will learn how to use TOAD to create and execute SQL scripts, save the output, and examine the explain plan. This chapter will discuss and illustrate every option available in the SQL Editor.
User-Defined Shortcuts
TOAD is completely configurable. You can easily add your own shortcuts to TOAD. It is easy to change the shortcut keystrokes for existing shortcuts, and it is just as easy to add your own shortcuts.

Access the Editor Options menu with a right-click or by pressing the F10 key and selecting Editing Options.

To change an existing keystroke assignment, select Key Assignments, locate the particular assignment to change, and click on the Edit Sequence button

Using Variables
TOAD supports all kinds of SQL, from all kinds of applications. If you were to bring in SQL, for example, from a SQL*Forms application, it will contain bind variables. Bind variables are used to supply SQL with data at execution time. This allows applications to use the same SQL statement to select and manipulate different data, depending on the data supplied to the bind variables.

Using the same SQL statement makes efficient use of the Oracle RDBMS SQL pool as the SQL will not be reparsed when using bind variables. The text of the SQL remains the same, so Oracle will reuse the same execution plan, making for a better-performing database environment.

When TOAD encounters bind variables, it will prompt you for their value

No comments: