Reserved & limited keywords

Snowflake SQL reserves all ANSI keywords (with the exception of type keywords such as CHAR, DATE, DECIMAL, etc.), as well as some additional keywords (ASC, DESC, MINUS, etc.) that are reserved by other popular databases. Additionally, Snowflake reserves keywords REGEXP and RLIKE (which function like the ANSI reserved keyword LIKE) and SOME (which is a synonym for the ANSI reserved keyword ANY).

To avoid parsing ambiguities, Snowflake SQL also prohibits the use of keywords such as LEFT, OUTER, JOIN, etc. as table names or aliases in the FROM list, and the use of keywords such as TRUE, FALSE, CASE, etc. as column references in scalar expressions.

The following table provides the list of reserved keywords in Snowflake and keywords that are not strictly reserved, but have usage limitations:

KeywordComment
A
ACCOUNT

Cannot be used as an identifier in a SHOW command (e.g. ‘SHOW … IN <identifier>’).

ALLReserved by ANSI.
ALTERReserved by ANSI.
ANDReserved by ANSI.
ANYReserved by ANSI.
ASReserved by ANSI.
B
BETWEENReserved by ANSI.
BYReserved by ANSI.
C
CASECannot be used as column reference in a scalar expression.
CASTCannot be used as column reference in a scalar expression.
CHECKReserved by ANSI.
COLUMNReserved by ANSI.
CONNECTReserved by ANSI.
CONNECTION

Cannot be used as an identifier in a SHOW command (e.g. ‘SHOW … IN <identifier>’).

CONSTRAINTCannot be used as a column name in CREATE TABLE DDL.
CREATEReserved by ANSI.
CROSSCannot be used as table name or alias in a FROM clause.
CURRENTReserved by ANSI.
CURRENT_DATECannot be used as column name (reserved by ANSI).
CURRENT_TIMECannot be used as column name (reserved by ANSI).
CURRENT_TIMESTAMPCannot be used as column name (reserved by ANSI).
CURRENT_USERCannot be used as column name (reserved by ANSI).
D
DATABASE

Cannot be used as an identifier in a SHOW command (e.g. ‘SHOW … IN <identifier>’).

DELETEReserved by ANSI.
DISTINCTReserved by ANSI.
DROPReserved by ANSI.
E
ELSEReserved by ANSI.
EXISTSReserved by ANSI.
F
FALSECannot be used as column reference in a scalar expression.
FOLLOWINGReserved by ANSI.
FORReserved by ANSI.
FROMReserved by ANSI.
FULLCannot be used as table name or alias in a FROM clause.
G
GRANTReserved by ANSI.
GROUPReserved by ANSI.
GSCLUSTER

Cannot be used as an identifier in a SHOW command (e.g. ‘SHOW … IN <identifier>’).

H
HAVINGReserved by ANSI.
I
ILIKEReserved by Snowflake.
INReserved by ANSI.
INCREMENTReserved by Snowflake and others.
INNERCannot be used as table name or alias in a FROM clause.
INSERTReserved by ANSI.
INTERSECTReserved by ANSI.
INTOReserved by ANSI.
ISReserved by ANSI.
ISSUE

Cannot be used as an identifier in a SHOW command (e.g. ‘SHOW … IN <identifier>’).

J
JOINCannot be used as table name or alias in a FROM clause.
L
LATERALCannot be used as table name or alias in a FROM clause.
LEFTCannot be used as table name or alias in a FROM clause.
LIKEReserved by ANSI.
LOCALTIMECannot be used as column name (reserved by ANSI).
LOCALTIMESTAMPCannot be used as column name (reserved by ANSI).
M
MINUSReserved by Snowflake and others.
N
NATURALCannot be used as table name or alias in a FROM clause.
NOTReserved by ANSI.
NULLReserved by ANSI.
O
OFReserved by ANSI.
ONReserved by ANSI.
ORReserved by ANSI.
ORDERReserved by ANSI.
ORGANIZATION

Cannot be used as an identifier in a SHOW command (e.g. ‘SHOW … IN <identifier>’).

Q
QUALIFYReserved by Snowflake.
R
REGEXPReserved by Snowflake.
REVOKEReserved by ANSI.
RIGHTCannot be used as table name or alias in a FROM clause.
RLIKEReserved by Snowflake.
ROWReserved by ANSI.
ROWSReserved by ANSI.
S
SAMPLEReserved by ANSI.
SCHEMA

Cannot be used as an identifier in a SHOW command (e.g. ‘SHOW … IN <identifier>’).

SELECTReserved by ANSI.
SETReserved by ANSI.
SOMEReserved by Snowflake.
STARTReserved by ANSI.
T
TABLEReserved by ANSI.
TABLESAMPLEReserved by ANSI.
THENReserved by ANSI.
TOReserved by ANSI.
TRIGGERReserved by ANSI.
TRUECannot be used as column reference in a scalar expression.
TRY_CASTCannot be used as column reference in a scalar expression.
U
UNIONReserved by ANSI.
UNIQUEReserved by ANSI.
UPDATEReserved by ANSI.
USINGCannot be used as table name or alias in a FROM clause.
V
VALUESReserved by ANSI.
VIEW

Cannot be used as an identifier in a SHOW command (e.g. ‘SHOW … IN <identifier>’).

W
WHENCannot be used as column reference in a scalar expression.
WHENEVERReserved by ANSI.
WHEREReserved by ANSI.
WINDOWReserved by ANSI.
WITHReserved by ANSI.