FROM Clause (SELECT Statement)

The FROM clause names the source tables for the query. These tables may be:

  • Tables or views named and accessed directly
  • Derived with a subquery that is part of the main query
  • Explicit joins

The FROM clause determines the tables from which the data is taken or derived. These sources can include temporary or permanent base tables, views, results of subqueries, and other operations that return tables.

You can use correlation names to qualify ambiguous column references in the rest of the statement. You can choose to join a table to itself, which is treated as a join of two identical tables. In this case, you must use correlation names to distinguish between the two tables. The correlation names prefix the "column_name" and are separated by a period. The column name list is for renaming columns, just as they are in the SELECT clause.

The names used here, however, are not for the output; they are for references to the columns made in the remainder of the statement, particularly in the WHERE clause. They are optional, but may be required to clarify column references in some cases.