ASA Getting Started
Using Interactive SQL
One of the principal uses of Interactive SQL is to browse table data. This section shows how to query the information in the sample database.
You can display database information using the SELECT statement in Interactive SQL. The following example shows the command to type in the SQL Statements pane. Once you have typed the command, you must click the Execute SQL Statement button on the toolbar to carry out the command.
After you execute the statement, the data (called a result set) appears on the Results tab in the Results pane. You can use the scroll bars to see areas of the table that are outside your current view of the pane. By default, row numbers appear to the left of the result set.
To list all the columns and rows of the employee table
Start Interactive SQL and connect to the sample database.
Type the following in the SQL Statements pane:
SELECT * FROM employee
On the toolbar, click the Execute SQL Statement button.
emp_id | manager_id | emp_lname | emp_fname | ... |
---|---|---|---|---|
102 | 501 | Fran | Whitney | ... |
105 | 501 | Matthew | Cobb | ... |
129 | 902 | Philip | Chin | ... |
148 | 1293 | Julie | Jordan | ... |
... |
For more information about SELECT statements, see Selecting Data from Database Tables.
You can add, delete, and update rows within the result set.
For more information about editing the result set, see Editing table values in Interactive SQL.
Editing table values in Interactive SQL
Copying rows from the Interactive SQL result set