Executing SQL from a File Using SQL Explorer

To execute SQL from a file rather than from the query editor, select Execute | Execute From File in the query editor menubar. SQL Explorer displays a dialog that lets you identify the file that contains the SQL you want to execute. After you click Execute, SQL Explorer executes the file content and displays the result.

Executing SQL from a file is a good option for very large sequences of DDL or DML statements or complex queries with large select column lists and several table joins. The execution happens as a single transaction. Therefore, if a file has multiple SQL statements and the first statement returns an error, the remaining SQL statements are not executed unless a COMMIT or ROLLBACK statement is explicitly coded in the SQL file. After all SQL statements are executed, SQL Explorer executes a COMMIT statement.