SAND CDBMS SQL Reference Guide
SELECT

 

Previous Topic:
Value Expression Clause
Chapter Index
Next Topic:
Remote Table Clause

 

Table Expression Clause


table name
view name
These identify a table or view from which data is retrieved for the query results. Generally, the columns in the projection list are, or are based on, columns from tables or views referenced in the Table Expression clause.

( <SELECT statement> )
A subquery (nested table expression), which is a complete SELECT statement in itself, can appear in the FROM clause of another SELECT statement. The output of the subquery constitutes a "virtual" table that can be referenced in other parts of the SELECT statement, as if it were a regular base table or view. The subquery must be contained in parentheses, and it must be given a correlation name so that it can be referenced elsewhere. Refer to Nested Table Expressions for further information and examples.

correlation name
This is an alias for the table, view, or subquery, used to identify the database object in qualified column references within the SELECT statement. A correlation name is optional for a table or view, since the actual table/view name can be used to qualify column references. A correlation name is required for a subquery, which cannot be referenced in any other way.

Note:
If the same table name or view name appears more than once in the Table Expression clause, only one of these table/view references can appear without a correlation name.

( <remote table> )
A dynamic pass-through query that will be sent to a remote database. In practice, dynamic pass-through queries are similar to nested table expressions. As with a subquery in the table expression clause, a dynamic pass-through query must be given a correlation name so that it can be referenced elsewhere.

The full syntax for the dynamic pass-through option is described in the next section (Remote Table Clause).