There are two ways to run an SQL script in Toad. The following are the examples.
Run SQL Script in Toad for Oracle
Method - 1
- Open Toad and connect to the database. Then click on the menu Database > SQL Editor.
- In SQL Editor, give the same command starting with @ as you use to give in SQL Plus to run an SQL script in Oracle. For example, @ D:\yourdir\example_script.sql and then press F5 to run the script.
Method - 2
- Open Toad and connect to the database. Then click on the menu Database > SQL Editor.
- In SQL Editor, press Ctrl+O and the open file dialog box will appear. Locate your SQL script and open.
- Then Press F5 or F9 to execute the SQL script contents.