Writing and executing SQL queries

Contents

What

The SQL Execute view is a tool in which you can write and execute SQL queries.

SQL Execute View
SQL Execute View

x

How

Prerequisite: A database connection to execute queries against must already be configured.

Writing and Executing SQL Queries

Image:IconOpenSQLFile.pngType your query statement in the text area of the SQL Execute View. You can also import SQL scripts by clicking the Open SQL File button.
Image:iconSaveAsSQLFile.pngYou can save your scripts by clicking the Save as SQL File button.
Image:iconExecuteAllSQL.pngClick the Execute All SQL button.
Image:iconExecuteAsScript.pngOr click the execute as Script button.
Image:iconClear.pngClick the Clear button to clear your query.
Image:iconManualCommit.pngTo commit a SQL statement, click the Manual Commit button.
Image:iconCommit.png Image:iconRollback.pngOr you can click Commit , or Rollback buttons.

Displaying the SQL Execute View

You can switch to the Database perspective—do it by clicking the Database button or selecting it from the Open Perspective menu in the upper right corner of your workbench—or simply open the view in your current perspective by choosing Show View > SQL Execute View from the Window menu (or Show View > Other > SQL Execute View if SQL Execute View isn't already on the show View menu).