Using QMF

Creating a synonym for a table or view

You can create a synonym for the name of a table or view by using the CREATE SYNONYM statement. Then when you refer to that table or view, you will not have to specify the fully-qualified table name.

For example, to create a synonym for the CALENDAR table, enter:

CREATE SYNONYM 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 SYNONYM CALEN FOR userid.CALENDAR

Now you can use the synonym where you previously specified the table name. In the previous example, you can specify CALEN instead of CALENDAR.

If you share a query that uses a synonym, the users you share it with must define the same synonym before they can run the query.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]