Displaying SQL query results

Contents

What

x The SQL result view displays the results of any SELECT query you execute using the SQL execute view in the database perspective (see Writing and executing SQL queries).

How

x

Using the SQL Result View

x

Features of the SQL Result View

x

Where Clause

If you have activated the SQL result view using the first method described above, you can search within your result using the Where input box. Type a valid SQL WHERE clause into this field and click the Search button to the right Image:iconExecuteAllSQL.png.

Filtering

Filter Settings Dialog
Filter Settings Dialog
The filter settings dialog is for changing the display of the SQL query results output. Launch the filter settings dialog by clicking the icon with arrows in the upper right of the SQL query results screen. Check boxes for which columns you wish to display. A yellow arrow controls the ordering of the columns. Click the arrow again to change the order direction, or deactivate ordering by a given clause.

Pin Column Widths

Image:IconPinWidths.png Clicking the Pin Column Widths icon will fix the widths of columns in the SQL query results display.

Editing Rows

x

Editing a row
Editing a row
To edit rows, click the F2 key, or click on a column. The column will then allow text entry. Use your arrow keys to move to different columns and rows.

Displaying the SQL Result View

If you have not already switched to the database perspective, click the database button Image:iconDatabasePerspective.png in the upper right corner of your workbench.

You will also need to have set up a connection to a database to execute an SQL query against it (see Exploring your databases).

The SQL result view is not displayed as one of the default views of the database perspective. There are two ways to activate this view.

  1. Use the DB tree view to drill down to a database, then a table, then either the TABLE or VIEW folders. Double clicking on a table or view will activate the SQL result view and display the contents (see Exploring your databases for details).
  1. Write and execute a SELECT query in the SQL execute view. Once you have written and executed a SELECT query, the SQL result view will appear above the SQL execute view, in the top area of the Aptana Studio workspace (see Writing and executing SQL queries for details).

Each result set will be displayed in the SQL result view with it's own tab.