Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements > ALTER TABLE >

REFERENCES Clause

The REFERENCES clause has the following syntax.

Read syntax diagramSkip visual syntax diagramREFERENCES Clause:
 
|--REFERENCES--table--+------------------+---------------------->
                      |    .-,------.    |
                      |    V        |    |
                      '-(----column-+--)-'
 
>--+--------------------------+---------------------------------|
   |  (1)                     |
   '--------ON DELETE CASCADE-'
 

Notes:
  1. Informix extension

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 ]