Running an Ad Hoc SQL Statement

Use the Eclipse launch configuration mechanism to run an ad hoc SQL query.

Make sure that you have created a connection profile for the database against which to run the ad hoc SQL query. Also make sure that the database is running and that you have established a connection to the database.

  1. Select Run > Run from the Eclipse toolbar to open the Launch Configuration wizard.

    Enter ad hoc SQL statements in the Create, manage, and run configurations page.

  2. Select the Main tab and enter a query name, if necessary.
  3. In the Profile field, select a connection profile and database from the drop-down menus.
  4. In the Type field, select Adhoc SQL.
  5. In the Run field, enter your SQL query.
  6. Click Run to execute the query.
You can view the results of the ad hoc query in the SQL Results view.
Related concepts
Database Development Perspective
SQL Results View
SQL Results History
Run
Related tasks
Executing a SQL File
Executing a SQL Statement