Column Definition

The table's schema information

Grammar syntax

column :=
  col_name data_type [column_constraint_specification] 
  [COMMENT col_comment], ...

column_constraint_specification:
  : [ PRIMARY KEY|UNIQUE|NOT NULL|DEFAULT [default_value]|CHECK [check_expression] ENABLE|DISABLE NOVALIDATE RELY/NORELY ]
 
default_value:
  : [ LITERAL|CURRENT_USER()|CURRENT_DATE()|CURRENT_TIMESTAMP()|NULL ] 
 

Data types

Click here for more information about the translation spec for data types. Also, see more information about data types in Hive herearrow-up-right.

Sample Source

1. COMMENT

circle-check
circle-info

The syntax is equivalent in both languages.

2. Primary Key

circle-check
circle-info

The syntax is equivalent in both languages.

3. Unique

circle-check
circle-info

The syntax is equivalent in both languages.

4. Default default_expression

The default value assigned to the column

circle-check
circle-info

The syntax is equivalent in both languages.

5. Not null

circle-check
circle-info

The syntax is equivalent in both languages.

6. Check

triangle-exclamation

Known Issues

No issues were found.

  1. MSC-HVXXXX : THE CREATE TABLE CHECK CONSTRAINT IS NOT SUPPORTED IN SNOWFLAKE.

Last updated

Was this helpful?