Reserved Keywords

Nov 18, 2016

When you use a reserved keyword in a Drill query, enclose the word in backticks. For example, if you issue the following query to Drill,
you must include backticks around the word TABLES because TABLES is a reserved keyword:

SELECT * FROM INFORMATION_SCHEMA.`TABLES`;

The following table provides the Drill reserved keywords that require back ticks:

A

ABS
ALL
ALLOCATE
ALLOW
ALTER
AND
ANY
ARE
ARRAY
AS
ASENSITIVE
ASYMMETRIC
AT
ATOMIC
AUTHORIZATION
AVG

B

BEGIN
BETWEEN
BIGINT
BINARY
BIT
BLOB
BOOLEAN
BOTH
BY

C

CALL
CALLED
CARDINALITY
CASCADED
CASE
CAST
CEIL
CEILING
CHAR
CHARACTER
CHARACTER_LENGTH
CHAR_LENGTH
CHECK
CLOB
CLOSE
COALESCE
COLLATE
COLLECT
COLUMN
COMMIT
CONDITION
CONNECT
CONSTRAINT
CONVERT
CORR
CORRESPONDING
COUNT
COVAR_POP
COVAR_SAMP
CREATE
CROSS
CUBE
CUME_DIST
CURRENT
CURRENT_CATALOG
CURRENT_DATE
CURRENT_DEFAULT_TRANSFORM_GROUP
CURRENT_PATH
CURRENT_ROLE
CURRENT_SCHEMA
CURRENT_TIME
CURRENT_TIMESTAMP
CURRENT_TRANSFORM_GROUP_FOR_TYPE
CURRENT_USER
CURSOR
CYCLE

D

DATABASES
DATE
DAY
DEALLOCATE
DEC
DECIMAL
DECLARE
DEFAULT
DEFAULT_KW
DELETE
DENSE_RANK
DEREF
DESCRIBE
DETERMINISTIC
DISALLOW
DISCONNECT
DISTINCT
DOUBLE
DROP
DYNAMIC

E

EACH
ELEMENT
ELSE
END
END_EXEC
ESCAPE
EVERY
EXCEPT
EXEC
EXECUTE
EXISTS
EXP
EXPLAIN
EXTERNAL
EXTRACT

F

FALSE
FETCH
FILES
FILTER
FIRST_VALUE
FLOAT
FLOOR
FOR
FOREIGN
FREE
FROM
FULL
FUNCTION
FUSION

G

GET
GLOBAL
GRANT
GROUP
GROUPING

H

HAVING
HOLD
HOUR

I

IDENTITY
IF
IMPORT
IN
INDICATOR
INNER
INOUT
INSENSITIVE
INSERT
INT
INTEGER
INTERSECT
INTERSECTION
INTERVAL
INTO
IS

J

JAR
JOIN

L

LANGUAGE
LARGE
LAST_VALUE
LATERAL
LEADING
LEFT
LIKE
LIMIT
LN
LOCAL
LOCALTIME
LOCALTIMESTAMP
LOWER

M

MATCH
MAX
MEMBER
MERGE
METHOD
MIN
MINUTE
MOD
MODIFIES
MODULE
MONTH
MULTISET

N

NATIONAL
NATURAL
NCHAR
NCLOB
NEW
NO
NONE
NORMALIZE
NOT
NULL
NULLIF
NUMERIC

O

OCTET_LENGTH
OF
OFFSET
OLD
ON
ONLY
OPEN
OR
ORDER
OUT
OUTER
OVER
OVERLAPS
OVERLAY

P

PARAMETER
PARTITION
PERCENTILE_CONT
PERCENTILE_DISC
PERCENT_RANK
POSITION
POWER
PRECISION
PREPARE
PRIMARY
PROCEDURE

R

RANGE
RANK
READS
REAL
RECURSIVE
REF
REFERENCES
REFERENCING
REGR_AVGX
REGR_AVGY
REGR_COUNT
REGR_INTERCEPT
REGR_R2
REGR_SLOPE
REGR_SXX
REGR_SXY
RELEASE
REPLACE
RESULT
RETURN
RETURNS
REVOKE
RIGHT
ROLLBACK
ROLLUP
ROW
ROWS
ROW_NUMBER

S

SAVEPOINT
SCHEMAS
SCOPE
SCROLL
SEARCH
SECOND
SELECT
SENSITIVE
SESSION_USER
SET
SHOW
SIMILAR
SMALLINT
SOME
SPECIFIC
SPECIFICTYPE
SQL
SQLEXCEPTION
SQLSTATE
SQLWARNING
SQRT
START
STATIC
STDDEV_POP
STDDEV_SAMP
SUBMULTISET
SUBSTRING
SUM
SYMMETRIC
SYSTEM
SYSTEM_USER

T

TABLE
TABLES
TABLESAMPLE
THEN
TIME
TIMESTAMP
TIMEZONE_HOUR
TIMEZONE_MINUTE
TINYINT
TO
TRAILING
TRANSLATE
TRANSLATION
TREAT
TRIGGER
TRIM
TRUE

U

UESCAPE
UNION
UNIQUE
UNKNOWN
UNNEST
UPDATE
UPPER
USE
USER
USING

V

VALUE
VALUES
VARBINARY
VARCHAR
VARYING
VAR_POP
VAR_SAMP

W

WHEN
WHENEVER
WHERE
WIDTH_BUCKET
WINDOW
WITH
WITHIN
WITHOUT

Y

YEAR