Aliases

An alias is an alternate name for a table or view.

An alias can be used to reference a table or view in cases where an existing table or view can be referenced.1 However, the option of referencing a table or view by an alias is not explicitly shown in the syntax diagrams or mentioned in the description of SQL statements. Like tables and views, an alias may be created, dropped, and have a comment or label associated with it. No authority is necessary to use an alias. Access to the tables and views that are referred to by the alias, however, still requires the appropriate authorization for the current statement.

An alias has a name and may have a different system name. The system name is the name used by the IBM® i operating system. Either name is acceptable wherever an alias-name is specified in SQL statements.

An alias is created with the CREATE ALIAS statement. For more information about creating aliases, see CREATE ALIAS.

1 You cannot use an alias in all contexts. For example, an alias that refers to an individual member of a database file cannot be used in most SQL schema statements. For more information, see CREATE ALIAS.