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 Oracle and 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:

Keyword

Comment

A

ABORT

ACCESS

ACCOUNT

Normally unreserved but could cause ambiguities in show commands, which cannot show any entity with this token as name.

ACCOUNTS

ACTION

ACTIVATE

ADD

AFTER

ALL

Reserved by ANSI.

ALTER

Reserved by ANSI.

AND

Reserved by ANSI.

ANY

Reserved by ANSI.

ARRAY

AS

Reserved by ANSI.

ASC

AT

AUDITING

AUTHORIZATION

AUTHORIZATIONS

AUTOINCREMENT

B

BAR

BEFORE

BEGIN

BERNOULLI

BETWEEN

Reserved by ANSI.

BIGINT

BINARY

BIT

BLOCK

BOOLEAN

BUILD

BUILTIN

BY

Reserved by ANSI.

BYTE

BYTEINT

C

CACHE

CALL

CALLED

CALLER

CASCADE

CASE

Can’t be used as column reference in a scalar expression.

CAST

Can’t be used as column reference in a scalar expression.

CHANGE

CHAR

CHARACTER

CHECK

Reserved by ANSI.

CHILD

CLEAREPCACHE

CLONE

CLUSTER

CLUSTERING

CLUSTERS

COLLATE

COLUMN

Reserved by ANSI.

COLUMNS

COMMENT

COMMIT

COMPRESSION

CONNECT

Reserved by ANSI.

CONNECTION

Normally unreserved but could cause ambiguities in show commands, which cannot show any entity with this token as name.

CONNECTIONS

CONNECT_BY_ROOT

CONSTRAINT

Normally unreserved but could cause ambiguity when used as column name.

CONSTRAINTS

CONTINUE

COPY

CP

CREATE

Reserved by ANSI.

CREDENTIALS

CROSS

Can’t be used as table name or alias in FROM clause.

CUBE

CURRENT

Reserved by ANSI.

CURRENT_DATE

Can’t be used as column name (reserved by ANSI).

CURRENT_ROLE

Can’t be used as column name (reserved by ANSI).

CURRENT_TIME

Can’t be used as column name (reserved by ANSI).

CURRENT_TIMESTAMP

Can’t be used as column name (reserved by ANSI).

CURRENT_USER

Can’t be used as column name (reserved by ANSI).

D

D

DATA

DATABASE

Normally unreserved but could cause ambiguities in show commands, which cannot show any entity with this token as name.

DATABASES

DATE

DATETIME

DATE_PART

Can be used as an identifier.

DEC

DECIMAL

DEFAULT

DEFERRABLE

DEFERRED

DEFRAGMENT

DELEGATED

DELETE

Reserved by ANSI.

DELIMITED

DEPLOYMENT

DEPLOYMENTS

DESC

DESCRIBE

DIRECTORY

DISABLE

DISCONNECT

DISTINCT

Reserved by ANSI.

DIV

DO

DOUBLE

DROP

Reserved by ANSI.

DUAL

E

ELSE

Reserved by ANSI.

ENABLE

END

ENFORCED

ESCAPE

EXCEPT

EXCLUSIVE

EXECUTE

EXISTS

Reserved by ANSI.

EXPLAIN

EXPORTED

EXTERNAL

EXTRACT

Can be used as an identifier.

F

FAIL

FALSE

Can’t be used as column reference in a scalar expression.

FETCH

FIELDS

FILE

FILES

FIRST

FIRST_VALUE

Can be used as an identifier.

FLOAT

FN

FOLLOWING

Reserved by ANSI.

FOR

Reserved by ANSI.

FORCE

FOREIGN

FORMAT

FORMATS

FREE

FROM

Reserved by ANSI.

FULL

Can’t be used as table name or alias in FROM clause.

FUNCTION

FUNCTIONS

FUTURE

G

GET

GLOBAL

GRANT

Reserved by ANSI.

GRANTS

GROUP

Reserved by ANSI.

GROUPING

GSCLUSTER

Normally unreserved but could cause ambiguities in show commands, which cannot show any entity with this token as name.

GSCLUSTERS

GSINSTANCE

GSINSTANCES

GSMAPPINGS

GSPACKAGES

H

HAVING

Reserved by ANSI.

HELP

HIBERNATE

HINTS

HISTORY

I

IDENTIFIED

IDENTIFIER

Can be used as an identifier.

IDENTITY

IF

IGNORE

ILIKE

Snowflake has a function with this name. . Reserved by Snowflake.

IMMEDIATE

IMMUTABLE

IMPORT

IMPORTED

IN

Reserved by ANSI.

INBOUND

INBOUND_FDN

INCIDENT

INCIDENTS

INCREMENT

Reserved by Oracle and others.

INFO

INITIALLY

INNER

Can’t be used as table name or alias in FROM clause.

INPUT

INSERT

Snowflake has a function with this name. . Reserved by ANSI.

INT

INTEGER

INTEGRATION

INTEGRATIONS

INTERLEAVED

INTERSECT

Reserved by ANSI.

INTERVAL

INTO

Reserved by ANSI.

IS

Reserved by ANSI.

ISSUE

Normally unreserved but could cause ambiguities in show commands, which cannot show any entity with this token as name.

ISSUES

J

JOBS

JOIN

Can’t be used as table name or alias in FROM clause.

K

KEEP

KEY

KEYS

L

LAG

Can be used as an identifier.

LANGUAGE

LAST

LAST_VALUE

Can be used as an identifier.

LATERAL

Can’t be used as table name or alias in FROM clause.

LEAD

Can be used as an identifier.

LEFT

Can’t be used as table name or alias in FROM clause.

LIKE

Snowflake has a function with this name. . Reserved by ANSI.

LIMIT

LINEAR

LINK

LIST

LOAD

LOCAL

LOCATION

LOCK

LOCKS

LS

M

MANAGE

MANAGED

MAP

MATCH

MATCHED

MATERIALIZED

MERGE

METASTORE

METASTORES

MINUS

Reserved by Oracle and others.

MODIFY

MONITOR

MONITORS

N

NAME

NATURAL

Can’t be used as table name or alias in FROM clause.

NETWORK

NEXT

NO

NORELY

NOT

Reserved by ANSI.

NOTIFICATION

NOTIFICATIONS

NOTIFY

NOVALIDATE

NTH_VALUE

Can be used as an identifier.

NULL

Reserved by ANSI.

NULLS

NUMBER

NUMERIC

O

OBJECT

OBJECTS

OF

Reserved by ANSI.

OFFSET

OJ

ON

Reserved by ANSI.

ONLY

OPERATE

OPERATION

OPTION

OR

Reserved by ANSI.

ORDER

Reserved by ANSI.

ORGANIZATION

Normally unreserved but could cause ambiguities in show commands, which cannot show any entity with this token as name.

ORGANIZATIONS

OUT

OUTBOUND

OUTBOUND_FDN

OUTER

OVER

OVERWRITE

OWNER

OWNERSHIP

P

PACREAD

PACWRITE

PARAMETER

PARAMETERS

PARTIAL

PARTITION

PASSWORD

PERCENT

PIPE

PIPES

PIVOT

PLAN

PLUS

POLICIES

POLICY

POOL

POSITION

Can be used as an identifier.

PRECEDING

PRECISION

PRESERVE

PRIMARY

PRIOR

PRIVILEGES

PROCEDURE

PROCEDURES

PROVISION

PROVISIONINGREQUESTS

PROVISIONINGSERVERS

PUBLIC

PURGE

PUT

Q

QUERIES

QUIESCE

R

RANGE

READ

READS

REAL

REBUILD

RECLUSTER

RECURSIVE

REFERENCE

REFERENCES

REFERENCE_USAGE

REFRESH

REGEXP

Reserved by Snowflake.

REGIONS

RELEASE

RELY

REMOVE

RENAME

REPEATABLE

REPLACE

REPLACE_FAIL

REPLICA

REPLICATION

RESET

RESOURCE

RESPECT

RESTART

RESTORE

RESTRICT

RESULT

RESUME

RETURNS

REVOKE

Reserved by ANSI.

REWRITE

RIGHT

Can’t be used as table name or alias in FROM clause.

RLIKE

Snowflake has a function with this name. . Reserved by Snowflake.

RM

ROLE

ROLES

ROLLBACK

ROLLUP

ROW

Reserved by ANSI.

ROWS

Reserved by ANSI.

RULE

S

SAMPLE

Reserved by ANSI (SQL:2003).

SCHEMA

Normally unreserved but could cause ambiguities in show commands, which cannot show any entity with this token as name.

SCHEMAS

SECURE

SECURITY

SEED

SELECT

Reserved by ANSI.

SEMI

SEQUENCE

SEQUENCES

SERVER

SERVERS

SESSION

SET

Reserved by ANSI.

SETLOGLEVEL

SETS

SETUP

SFC

SHARE

SHARED

SHARES

SHOW

SHUTDOWN

SIMPLE

SMALLINT

SOME

Reserved by Snowflake.

SORT

STAGE

STAGES

START

Reserved by ANSI.

STARTS

STATEMENT

STATISTICS

STOP

STORAGE

STORED

STREAM

STREAMS

STRICT

STRING

STRUCT

SUBSCRIPTION

SUBSCRIPTIONS

SUPPORT

SUSPEND

SUSPENDED

SUSPEND_IMMEDIATE

SWAP

SWITCH

SYNC

SYNONYM

SYSTEM

T

T

TABLE

Reserved by ANSI.

TABLES

TABLESAMPLE

Reserved by ANSI (SQL:2003).

TASK

TASKS

TEMP

TEMPLATE

TEMPORARY

TERSE

TEXT

THEN

Reserved by ANSI.

TIME

TIMESTAMP

TIMESTAMPLTZ

TIMESTAMPNTZ

TIMESTAMPTZ

TIMESTAMP_LTZ

TIMESTAMP_NTZ

TIMESTAMP_TZ

TINYINT

TO

Reserved by ANSI.

TRANSACTION

TRANSACTIONS

TRANSIENT

TRIGGER

Reserved by ANSI.

TRIGGERS

TRUE

Can’t be used as column reference in a scalar expression.

TRUNCATE

TRY_CAST

Can’t be used as column reference in a scalar expression.

TS

TYPE

TYPES

U

UNBOUNDED

UNDO

UNDROP

UNION

Reserved by ANSI.

UNIQUE

Reserved by ANSI.

UNLOCK

UNPIVOT

UNSET

UPDATE

Reserved by ANSI.

UPGRADE

USAGE

USE

USER

USERS

USING

Can’t be used as table name or alias in FROM clause.

UTC

UTCTIMESTAMP

V

VALIDATE

VALUES

Reserved by ANSI.

VARBINARY

VARCHAR

VARIABLES

VARIANT

VARYING

VERSION

VIEW

Normally unreserved but could cause ambiguities in show commands, which cannot show any entity with this token as name.

VIEWS

VOLATILE

VOLUME

VOLUMES

W

WAREHOUSE

WAREHOUSES

WARN

WHEN

Can’t be used as column reference in a scalar expression.

WHENEVER

Reserved by ANSI.

WHERE

Reserved by ANSI.

WITH

Reserved by ANSI.

WITHIN

WITHOUT

WORK

WRITE

Z

ZONE