Home | Previous Page | Next Page   Selecting Data from Complex Types (IDS) > Selecting Row-Type Data >

Selecting Columns of a Typed Table

A query on a typed table is no different from a query on any other table. For example, Figure 129 uses the asterisk symbol (*) to specify a SELECT statement that returns all columns of the employee table.

Figure 129. Query
SELECT * FROM employee

The SELECT statement on the employee table returns all rows for all columns, as Figure 130 shows.

Figure 130. Query Result
name        Paul, J.
address     ROW(102 Ruby, Belmont, CA, 49932, 1000)
salary      78000

name        Davis, J.
address     ROW(133 First, San Jose, CA, 85744, 4900)
salary      75000

·
·
·

Figure 131 shows how to construct a query that returns rows for the name and address columns of the employee table.

Figure 131. Query
SELECT name, address FROM employee

Figure 132. Query Result
name        Paul, J.
address     ROW(102 Ruby, Belmont, CA, 49932, 1000)

name        Davis, J.
address     ROW(133 First, San Jose, CA, 85744, 4900)

·
·
·
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]