from-clause

The FROM clause specifies an intermediate result table.

from-clause

Read syntax diagramSkip visual syntax diagramFROM,table-reference

If only one table-reference is specified, the intermediate result table is simply the result of that table-reference. If more than one table-reference is specified, the intermediate result table consists of all possible combinations of the rows of the result of each specified table-reference.

Each row of the result is a row from the result of the first table-reference concatenated with a row from the result of the second table-reference, concatenated with a row from the result of the third table-reference, and so on. The number of rows in the result is the product of the number of rows in the result of each table-reference. Thus, if the result of any table-reference is empty, the result is empty.

Start of changeIf more than one table-reference is specified, the referenced tables and views must not include both inclusive-exclusive BUSINESS_TIME periods and inclusive-inclusive BUSINESS_TIME periods.End of change

If table-reference has row access controls enforced, table-reference has at least one row permission: the default row permission. When there are multiple row permissions defined for a table-reference, a row access control search condition is derived by applying the logical OR operator to the search condition in each enabled permission. This derived search condition acts as a filter to the table-reference to determine the result table of the table-reference that is accessible to the authorization ID or role of the subselect.

If a table-reference contains a security label column, Db2 compares the security label of the user to the security label of each row. Results are returned according to the following rules:

  • If the security label of the user dominates the security label of the row, Db2 returns the row.
  • If the security label of the user does not dominate the security label of the row, Db2 does not return the data from that row, and Db2 does not generate an error report.