The REFERENCES clause has the following syntax.
REFERENCES Clause: |--REFERENCES--table--+------------------+----------------------> | .-,------. | | V | | '-(----column-+--)-' >--+--------------------------+---------------------------------| | (1) | '--------ON DELETE CASCADE-'
Element | Description | Restrictions | Syntax |
---|---|---|---|
column | Referenced column in the referenced table | See Restrictions on Referential Constraints. | Identifier, p. Identifier |
table | The referenced table | The referenced and the referencing tables must reside in the same database | Database Object Name,
p. Database Object Name |
The REFERENCES clause allows you to place a foreign-key reference on a column. The referenced column can be in the same table as the referencing column, or in a different table in the same database.
If the referenced table is different from the referencing table, the default column is the primary-key column. If the referenced table is the same as the referencing table, there is no default.
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]