Tuesday, 21 April 2015

Table Aliase

Table aliases help to keep SQL code smaller, therefore using less memory.

Table aliases can be up to 30 characters in length, but shorter aliases are better than longer ones.
If a table alias is used for a particular table name in the FROM clause, then that table alias must be substituted for the table name throughout the SELECT statement.
Table aliases should be meaningful.

The table alias is valid for only the current SELECT statement.


SELECT e.employee_id, e.last_name,
       d.location_id, department_id
FROM   employees e JOIN departments d
USING (department_id) ;



Share this

0 Comment to "Table Aliase"

Post a Comment