You can use dbisqlc is to look at information in databases.
The instructions and examples in this section use a database for a fictional company. The sample database contains information about employees, departments, sales orders, and so on.
All this information is organized into a number of tables that are made up of rows and columns.
Sybase IQ provides a number of built-in functions called system stored procedures. Use these procedures to display information about your database.
For example, use the sp_iqtable stored procedure to list the tables in the sample database. To run a stored procedure, type its name (and any parameters) in the command window.
See Chapter 7, “System Procedures” in Reference: Building Blocks, Tables, and Procedures.
To list the data stored within database tables, type a SELECT command in the dbisqlc command window, then press F9 (if supported), or Command > Execute from the menu to carry out the command. The example output that follows shows the first several columns and rows of the results of the query which appear in the dbisqlc data window.
Enter:
SELECT * FROM Employees
EmployeeID |
ManagerID |
Surname |
GivenName |
... |
---|---|---|---|---|
102 |
501 |
Whitney |
Fran |
... |
105 |
501 |
Cobb |
Matthew |
... |
129 |
902 |
Chin |
Philip |
... |
148 |
1293 |
Jordan |
Julie |
... |
160 |
501 |
Breault |
Robert |
... |
... |
|
|
|
In the examples, SQL keywords are shown in uppercase; however, SQL statements are case-insensitive.
In many examples, each clause of a SQL statement is placed on a separate line for readability. You can enter SQL statements either all on one line, or you can break them over several lines.