Show TOC

Table ReferenceLocate this document in the navigation structure

A table reference is a table name with an optional table alias . Table references are used in the FROM clause of a query specification, of the SELECT FOR UPDATE statement and of the SELECT INTO statement. If a table alias has been introduced, the alias must be used in the entire scope of the alias instead of the table name.

<table reference> ::= <table name> 
    ( ( AS )? <table alias> )?.

<table name> ::= <identifier>.

<table alias> ::= <identifier>.

         
Sample Code
SELECT employee_name FROM employees AS e WHERE e.employee_id = 123
            

Table Alias. For the table employees the alias e is introduced in the FROM clause. This alias has to be used in the WHERE clause instead of the table name.

More Information

FROM Clause