# Executing a SQL File

You can execute a SQL file from the SQL Editor and from the Navigator View.

Execute the SQL using one of the following methods.

Option | Description
--- | ---

From SQL Editor

1. Open the SQL file from the Navigator project folder in which it is stored by right-clicking the file and choosing Open With > SQL File Editor from the context menu.
2. In SQL Editor, right-click in the file content, and select Execute All from the context menu.

The SQL Results view displays the result sets, database server messages, execution status (success or failure) and operation details.
Note: If the SQL file is not connected to the connection profile with which it is associated, Execute All is disabled.

From the Navigator view

1. Right-click the file in the Navigator View, and choose Open With > SQL File Editor from the context menu.
2. In SQL Editor, right-click in the file content, and select Execute All from the context menu.

The SQL Results view displays the result sets, database server messages, execution status (success or failure) and operation details.

The SQL file executes, and results appear in the SQL Results view.

Related concepts
Database Development Perspective
SQL Results View
SQL Results History
SQL Files
SQL Editor
Run
Related tasks
Executing a SQL Statement
Running an Ad Hoc SQL Statement
Creating a SQL File
Opening a SQL File
Editing a SQL File
Saving a SQL File