Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - Database Administration » Database administration » SQL Anywhere graphical administration tools » Interactive SQL


Interactive SQL history

When you execute a statement, Interactive SQL automatically saves it in a history list that persists between Interactive SQL sessions. Interactive SQL maintains a record of up to 50 of the most recent statements.

You can view the entire list of statements in the History window. To access the History window, press Ctrl+H, or click SQL » History on the toolbar.

SQL statements History window.

The most recent statements appear at the bottom of the list. To recall a statement, select it and then click OK. It appears in the SQL Statements pane of Interactive SQL. You can select multiple statements from the History window.

You can copy statements from the History window to use elsewhere, by selecting the statements in the History window, and then pressing Ctrl+C or clicking the Copy button. Click OK to copy the selected statements to the SQL Statements pane of Interactive SQL. When you copy multiple statements, they are separated by the statement delimiter (a semicolon by default).

You can save statements in text files so that you can use them in a subsequent Interactive SQL session by pressing Ctrl+S or clicking the Save History As .SQL File button, specifying a location and name for the .sql file, and then clicking Save. You can also save SQL script files in a Favorites list.

The contents of the History window persist between Interactive SQL sessions. You can remove the selected statements from the history by clicking Delete. You can remove all statements from the history by clicking Clear History. Neither action can be undone.

You can also recall statements without the History window. Use the Recall Previous SQL Statement and Recall Next SQL Statement icons in the toolbar to scroll back and forward through your statements, or press Alt+Right Arrow and Alt+Left Arrow, respectively.


If you execute a SQL statement that contains password information (CREATE USER, CONNECT, or CREATE EXTERNLOGIN), the password information appears in the History window for the duration of the current Interactive SQL session.

When the statement history is viewed in subsequent Interactive SQL sessions, passwords are replaced with ... in any of these statements that contain password information. For example, if you execute the following statement in Interactive SQL:

CREATE USER testuser
 IDENTIFIED BY testpassword;

the following statement appears in the History window in subsequent Interactive SQL sessions:

CREATE USER testuser
 See also

Adding SQL script files, SQL statements, and connections to favorites
Editing favorites
Sharing favorites