Displaying data in dbisqlc

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.


Listing the tables in a database

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.


Listing all the columns and rows of the employee table

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

...

...

Notes