This approach makes it easy to rerun prior SQL statements, particularly when testing. These tabs are associated with a single connection to the Oracle database. Use the + next to the existing open tab to open others. One of the authors likes to simply open a new tab (right-click the tab, and select New Tab) and put each individual unit of work in its own tab. The Clear button (see Figure 3.2 at the cursor position) clears the contents of the SQL Editor window. This feature is also dependent upon Toad Options → Oracle → Transactions Run in Threads selected. It will un-gray as SQL is executing in Toad.
The Halt button stops the current SQL execution. There is a separate Script Output tab for the result of this type of execution. The Execute as a script button runs the contents of the Editor window as if it were using a SQL*Plus character-mode interface. After execution, the Data Grid output tab will be populated. Some people highlight the SQL they wish to execute.
Toad will just execute the one SQL statement. You can also just put the cursor on a SQL statement (if there are multiple SQL statements in the Editor window) and click this button.
The Execute button will run all code in the Editor window. The bottom toolbar has the Execute, Execute as Script, Clear, and Halt buttons. You can right-click on these toolbars to show or hide the ones you don’t work with. The next toolbar enables you to open code from the file system or from the database and also offers access to other features. Dan uses red borders for SYS and SYSTEM accounts, and then a different color for each different Oracle database to which he connects. You can change the color border per your needs.
There are also toolbars for team coding, desktops, connection, jump search, and workspaces. The window toolbar shows the active Toad windows. By closing the ones you don’t use, Toad can perhaps have a larger Editor window. Right-click on any of these top toolbars and you can select the ones you wish to have visible. The top toolbar (refer to Figure 3.1), called the standard toolbar, provides access to various Toad browsers, features, commit/rollback, and initiating additional connections. You typically have three ways to do most any function in Toad:Īctivating a menu item shows whether there is a button (it will appear) and any keystrokes that you can also use to activate the feature.