DB2 graphic  QMF Version 8

Creating an alias for a table or view

If you have CREATEALIAS privilege or SYSADM or SYSCTRL authority, you can create an alias for the name of a table or view by using the CREATE ALIAS statement.

For example, to create an alias for the CALENDAR table, enter:

CREATE ALIAS CALEN FOR CALENDAR

Depending on your database configuration, you might need to specify an owner qualifier when you specify the table. In that case, enter:

CREATE ALIAS CALEN FOR userid.CALENDAR

You can use an alias in the same way you use a synonym. The difference between a synonym and an alias, however, is that a synonym can be used only by its owner, and an alias can be used by its owner and other users.

If you share a query that uses an alias, the users you share it with do not have to define the same alias before they can run the query.


Go to the previous page Go to the next page

Downloads | Library | Support | Support Policy | Terms of use | Feedback
Copyright IBM Corporation 1982,2004 Copyright IBM Corporation 1982, 2004
timestamp Last updated: March, 2004