You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

A Query tab is displayed in the Workspace whenever you query a connection or database table, or display data on a table, as shown in the following screenshot:

It is divided into parts:

  • The editor is where you enter queries to be run on the database.
  • The results table is where the results of the last run query are shown.

The tool bar above the editor contains the following items:

Icon

Description

Click to Insert stored SQL query. You can select a stored query from the repository to be inserted at the cursor. Refer to Managing Stored Queries for details.

Click to Store SQL query. You can save the currently selected text, or the contents of the query pane if no text is selected, as a stored query in the repository. Refer to Managing Stored Queries for details.

Click to Cut the currently selected text from the editor pane and places it on the system clipboard.

Click to Copy and place the currently selected text in the editor pane on the system clipboard.

Click to Paste the current contents of the system clipboard into the editor pane.

Click to display a dialog to print the current contents of the results table.

  • Select Print Editor to print the contents of the editor.
  • Select Print results to view results of the print job.

Click to Execute the current contents of the editor, as separate SQL queries on the current database.

note

  • You can select a portion of the text in the editor before clicking Execute to only run that code. The shortcut key F5 can also be used.
  • By default, F5 executes each query in the editor, delimited by a semi colon - ;, separately using individual prepared statements. For creating stored procedures this behavior may be unwanted if the procedure uses a semi-colon as it's delimiter. In this scenario pressing F12 executes the entire contents of the editor, or the current selection, as a single query and without a prepared statement.

    The status bar below the results table contains the following items (from left to right):
  • Previous rows / Next rows - only a limited number of rows are displayed at a time however you can use these buttons to cycle between sets of rows. Refer to SQL Settings for details.
  • Status - shows information on the rows being displayed and how long the query took to run. While a query is running it shows the time it has been running for.
  • Save query results - saves the currently displayed rows as CSV.
  • Progress indicator - shows whether or not a query is currently running.
  • Abort query - aborts the currently running query (disabled if no query is currently running.


  • No labels