SELECT Statement

Selects DBMS columns for the view descriptor.
Type: Required statement
Applies to: view descriptor
Interaction: RESET

Syntax

SELECT ALL | column-identifier-1 <...column-identifier-n> ;

Details

The SELECT statement specifies which DBMS columns in the access descriptor to include in the view descriptor. This is a required statement and is used only when defining view descriptors.
If you use an editing statement, such as SELECT, it must follow the CREATE statement when you create a view descriptor. See CREATE Statement for more information about the order of statements.
The SELECT statement can take one of the following arguments:
ALL
includes in the view descriptor all the columns that were defined in the access descriptor excluding dropped columns.
column-identifier
can be either the DBMS column name or the positional equivalent from the LIST statement, which is the number that represents the column's place in the access descriptor on which the view is based. For example, to select the first three columns, submit the following statement:
select 1 2 3;
If the column name contains special characters or national characters, enclose the name in quotation marks. You can select as many columns as you want in one SELECT statement.
SELECT statements are cumulative within the same view creation. That is, if you submit the following two SELECT statements, columns 1, 5, and 6 are selected, not just columns 5 and 6:
select 1;select 5 6;
To clear all your current selections when creating a view descriptor, use the RESET ALL statement; you can then use another SELECT statement to select new columns.