For more information about the FROM clause, see SQL Data Manipulation Language, B035-1146.
- FROM table_name
- The name of a table containing the column or columns to include in the join index or the name of a table to join with at least one other table to form a join index. You cannot define a join index on any of the following database objects:
- Global temporary tables
- Hash indexes
- Join indexes
- Journal tables
- Ordinary views
- Queue tables
- Recursive views
- Volatile tables
- Each table in the FROM clause should have at least one column in either the fixed column_name list or in the repeating column_name list, if you are using row-compression.
- In a single-table join index, the column_name list must contain all columns in the FROM clause table.
- You can only define column partitioning for a single-table join index.
- Each table name can be qualified by a database name if necessary and can have a maximum of 64 different columns referenced in the entire join index definition.
- Every table must be connected to at least one other table with a join condition. The cross join and full outer join conditions are not supported.
- The maximum number of table_name references allowed is the same as the system limit for SELECT requests.
- A FROM clause can have any number of simple tables, but is limited to a single joined non-simple table expression. For example, you can use a simple table list or a single non-simple table expression:
FROM table_1, table_2, table_3, table_4 FROM (table_1 INNER JOIN table_2 ON x1 = x2) INNER JOIN (table_3 ON x1 = x3)
- The following example is not
allowed because it has more than one non-simple table expression:
FROM (table_1 INNER JOIN table_2 ON table_1 x1 = x2),(table_3 INNER JOIN table_4 ON x3 = x4)
- An optional database name if table_name is contained in a database other than the current database.
- An optional user name if table_name is contained in a user other than the current or user.
- AS correlation_name
- An alias for table_name.
- The keyword AS preceding correlation_name is optional.