CONSTRAINTS

Important Notice: Migration of Documentation Website

Please be advised that our documentation website is currently undergoing a migration to a new platform. To ensure you have access to the most up-to-date information, we kindly request that you visit our new documentation website located at:

Official Snowflake Snowconvert Documentation

For any immediate assistance or if you encounter any issues, please contact our support team at [email protected].

Thank you for your understanding.

Description

This ensures the accuracy and reliability of the data in the table. If there is any violation between the constraint and the data action, the action is aborted. (Sybase SQL Language Reference)

Grammar Syntax

<table-constraint> ::=
    [ CONSTRAINT <constraint-name> ] 
   {  { UNIQUE | PRIMARY KEY } ( <column-name> [ , … ] )  
     [ IN <dbspace-name> ]
     | <foreign-key-constraint>
     | CHECK ( <condition> )
   }
   
<foreign-key-constraint> ::=
   FOREIGN KEY [ <role-name> ] [ ( <column-name> [ , <column-name> ] … ) ] 
REFERENCES <table-name> [ ( <column-name> [ , <column-name> ] … ) ]
   …[ <actions> ] [ IN <dbspace-name> ]

<actions> ::=
   [ ON { UPDATE | DELETE } RESTRICT ]

Sample Source Patterns

Input Code:

Output Code:

SSC-EWI-0035: CHECK STATEMENT NOT SUPPORTED.

SSC-EWI-SY0003: UNSUPPORTED IQ UNIQUE CONSTRAINT.

Last updated