REFERENCES

Description

Specifies a foreign key constraint, which implies that the column must contain only values that match values in the referenced column of some row of the referenced table

Click herearrow-up-right to navigate to the Amazon Redshift docs page for this syntax.

Grammar Syntax

REFERENCES reftable [ ( refcolumn ) ]

Sample Source Patterns

Amazon Redshift

CREATE TABLE TABLE1
(
 COL1 INT PRIMARY KEY
);

CREATE TABLE TABLE2
(
 COL1 VARCHAR(15),
 COL2 INT REFERENCES TABLE1 (COL1)
);

Snowflake

Known issues

There are no known issues.

Last updated

Was this helpful?