Previous Topic: ExampleNext Topic: Subselect


SELECT

This SQL statement can be executed in the following ways:

Through the CA Datacom Datadictionary Interactive SQL Service Facility (interactive)

In an application program prepared using a CA Datacom/DB SQL Preprocessor (embedded)

By using CA Dataquery (SQL & Batch Modes)

select-into statement

 

YES

 

select-statement

YES

(use DECLARE CURSOR)

YES

full-select statement

(part of the select-statement)

(part of the select-statement)

(part of the select-statement)

subselect

(part of full-select statement)

(part of full-select statement)

(part of full-select statement)

Note: YES indicates a valid execution method for this statement.

Information about the DECLARE CURSOR statement begins on DECLARE CURSOR.

Note: The subselect and full-select forms of the SELECT statement are not executable directly, because they are components of other statements. To learn about using SQL keywords in CA Dataquery, see the CA Dataquery User Guide. For information about the access rights required to execute this statement, see the CA Datacom/DB Database and System Administration Guide.

The SELECT statement specifies a result table.

All of the tables and views specified in the SELECT statement must be in databases of the same security type, that is to say, either the CA Datacom/DB External Security Model or the SQL Security Model. See the CA Datacom Security Reference Guide for more information about security models.

Following is the syntax diagram for a SELECT statement:

►►─┬─ subselect ─────────────┬────────────────────────────────────────────────►◄
   ├─ full-select statement ─┤
   ├─ select-statement ──────┤
   └─ select-into statement ─┘

Note: The select-into statement is not used by CA Dataquery.