For more information about the FROM clause, see FROM Clause.
- database_name
- An optional database name if table_name is contained in a database other than the current database.
- user_name
- An optional user name if table_name is contained in a user other than the current or user.
- 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
- Join indexes
- Journal tables
- Ordinary views
- Queue tables
- Recursive views
- Volatile tables
- correlation_name
- An alias for table_name.
joined_table
A recursive use of the syntax of a joined table within the definition of a joined table. The joined table clause is used only for multitable join indexes and cannot be specified in the definition of a column-partitioned join index.
- INNER JOIN
- Keywords defining the join as an ordinary join.
- LEFT OUTER JOIN
- RIGHT OUTER JOIN
- Keywords defining the join as either a left or a right outer join. Full outer join is not supported for join indexes. For most non-aggregate applications, this is the better choice for defining a join index. You cannot specify outer joins for a join index that also contains aggregate operators in its definition. When you specify an outer join, the following rules apply:
- The outer table joining column for each condition must be contained in either the fixed column_name list or in the repeating column_name list, if using row-compression.
- The inner table of each join condition must have at least one non-nullable column in either the fixed column_name list or in the repeating column_name list, if using row-compression.
- The select list cannot specify a CASE or COALESCE column expression that is defined on a column set from the inner table of the outer join.
- search_condition
- A conditional expression for eliminating any rows from a query that do not evaluate to TRUE.
- table_name
- Name of a single table if no tables are joined in this clause.
- correlation_name
- An alias for table_name. The keyword AS preceding correlation_name is optional.