DISTKEY

Description

The keyword that specifies that the column is the distribution key for the table.

Click here to navigate to the Amazon Redshift docs page for this syntax.

Grammar Syntax

DISTKEY

Sample Source Patterns

Amazon Redshift

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

Snowflake

CREATE TABLE TABLE1
(
 COL1 INT
--          --** MSC-WARNING - MSC-RS0012 - DISTSTYLE ON COLUMN SHOULD BE MOVE TO TABLE OPTIONS. **
--          DISTKEY
                 ,
 COL2 VARCHAR(15)
)
CLUSTER BY (COL1);

MCS-RS0012: DISTKEY on the column should be moved to table options by CLUSTER BY.

Last updated