Correlation Names

Restriction: This topic applies to Windows environments only.

Correlation names are used in place of the actual table or view name when qualifying columns within a query statement. The correlation name appears immediately after the corresponding table or view name in the FROM clause (separated by a single space). Correlation names must satisfy the same naming conventions as table names, and must be unique among all table, view and other correlation names within a query. The correlation name qualifies columns that appear in either SELECT or WHERE clauses. See WHERE Clause for more information.

The following query shows a correlation name of "p" being assigned to the PART table, and a correlation name of "ps" being assigned to the PARTSUPP table.

SELECT pname, qty
  FROM part p, partsupp ps
  WHERE p.pno = ps.pno

More information on joins and correlation names appears in WHERE Clause and Other Clauses.