Aliases can make it easier to work with table names. Using aliases is helpful when:
For example, you can create an alias "e"
for a table name employee_information
, and then refer to the table as "e"
throughout the rest of the query.
You create table aliases in the SQL pane; you cannot create them in the Grid pane.
To create a table alias
"e"
to the employee_information
table and "p"
to the positions
table, you can create a FROM clause such as the following:FROM employee_information e, positions p
Note For most databases, you can add the option keyword AS between the table name and alias (for example, FROM employee_information AS e
). However, some databases do not allow this keyword. For details, see Query Designer Considerations for Oracle Databases.
When you create a table alias, the Query Designer substitutes the alias for the corresponding table name in the Table column of the Grid pane.
Note The SQL standard specifies that when you create an alias for a table name, you must use the alias to refer to the table in the rest of the SQL statement (that is, you cannot use the original table name). However, some databases do allow you to refer to the table by its original name. For details, refer to the documentation for your database.