SYSSYNTABLE
The syssyntable system catalog table outlines the
mapping between each public or private synonym and the database object
(table, sequence, or view) that it represents. It contains one row
for each entry in the systables table that has a tabtype value
of
P
or S
. The syssyntable table
has the following columns. Column | Type | Explanation |
---|---|---|
tabid | INTEGER | Identifying code of the public synonym |
servername | VARCHAR(128) | Name of an external database server |
dbname | VARCHAR(128) | Name of an external database |
owner | VARCHAR(32) | Name of the owner of an external object |
tabname | VARCHAR(128) | Name of an external table or view |
btabid | INTEGER | Identifying code of a base table, sequence, or view |
ANSI-compliant databases do not support public synonyms;
their syssyntable tables can describe only synonyms whose syssyntable.tabtype value
is P
.
If you define a synonym for an object that is in your current database, only the tabid and btabid columns are used. If you define a synonym for a table that is external to your current database, the btabid column is not used, but the tabid, servername, dbname, owner, and tabname columns are used.
The tabid column maps to systables.tabid. With the tabid information, you can determine additional facts about the synonym from systables.
An index on the tabid column allows only unique values. The btabid column is indexed to allow duplicate values.