FROM Clause
The FROM clause of the SELECT statement lists table objects from which to retrieve data.
This syntax fragment is part of the SELECT statement.
Element | Description | Restrictions | Syntax |
---|---|---|---|
alias | Temporary name for a table, view, or derived table in this query | See Aliases for Tables or Views. | Identifier |
derived _column | Temporary name for a derived column in a table expression | Unless the underlying collection is a ROW type, you can declare no more than one derived_column name | Identifier |
external | External table from which to retrieve data | Must exist, but cannot be the outer table in an outer join | Database Object Name |
subquery | Nested query whose results are available to the outer query | See Table expressions | SELECT statement |
synonym, table, view | Synonym for a table from which to retrieve data | Synonym and table or view to which it points must exist. Must include appropriate qualifiers. | Database Object Name |
Every SELECT statement requires the FROM clause, whether or not any data source is required. If your query uses the database server to evaluate an expression that requires no data source, the FROM clause can reference any existing table in the current database on which you hold sufficient access privileges, as in the following example:
SELECT ATANH(SQRT(POW(4,2) + POW(5,2))) FROM systables;