Execute a SQL statement using the SQL Editor.
Create an Eclipse project and connection profile for the database on which you intend to run a SQL statement.
- Select the
Navigator view.
A tree of existing projects displays.
- Right-click a project in which to construct a SQL statement and select
.
A wizard-selection page appears.
- In the wizard-selection page, select .
The
Create SQL File wizard appears.
- Enter the name of a parent folder in the text field, or specify an existing project in the folder list below the text field.
Alternately, you can create a project by clicking
Create Project
and following the wizard instructions.
- Specify a file name in the second text field.
- Specify a connection profile type, connection profile name, and database name in the corresponding drop-down lists. If no connection profile exists for the selected profile type, you can create a profile by clicking
Create and following the wizard instructions.
Note: Do not click
Do not connect now.
- Click Finish.
The SQL Editor opens with the file name you specified.
- Enter your SQL query in the SQL Editor.
- To execute the query, choose one of the following commands.
Option |
Command |
To execute everything in the window |
Right-click in the SQL Editor window and select
Execute All from the context menu. |
To execute only selected text |
Select the text you want to execute, right-click in the SQL Editor, and select
Execute Selected Text from the context menu. |
The results of the execution appear in
the
SQL Results view.