Identifiers and Keywords
DeltaStream SQL uses a lexical policy for identifiers (such as tables, columns, and function names) similar to SQL:
The case of identifiers is not preserved unless they are quoted.
Double-quotes
"
and back-ticks`
allow identifiers to contain non-alphanumeric characters, such asSELECT a AS `my field` FROM t
.
String literals must be enclosed in single quotes '
, such as '你好 Joe'. Duplicate a single quote for escaping, such as SELECT 'It''s me'
.
Reserved Keywords
The following is a list of reserved keywords in DeltaStream SQL:
A
ABS
ABSOLUTE
ACTION
ADA
ADD
ADMIN
ADVANCE
AFTER
ALL
ALLOCATE
ALLOW
ALTER
ALWAYS
ANALYZE
AND
ANY
APPROXIMATE
ARE
ARRAY
AS
ASC
ASENSITIVE
ASSERTION
ASSIGNMENT
ASYMMETRIC
AT
ATOMIC
ATTRIBUTE
ATTRIBUTES
AUTHORIZATION
AVG
BEFORE
BEGIN
BERNOULLI
BETWEEN
BIGINT
BINARY
BIT
BLOB
BOOLEAN
BOTH
BREADTH
BY
BYTES
C
CALL
CALLED
CARDINALITY
CASCADE
CASCADED
CASE
CAST
CATALOG
CATALOG_NAME
CATALOGS
CEIL
CEILING
CENTURY
CHAIN
CHANGELOG
CHAR
CHAR_LENGTH
CHARACTER
CHARACTER_LENGTH
CHARACTER_SET_CATALOG
CHARACTER_SET_NAME
CHARACTER_SET_SCHEMA
CHARACTERISTICS
CHARACTERS
CHECK
CLASS_ORIGIN
CLOB
CLOSE
COALESCE
COBOL
COLLATE
COLLATION
COLLATION_CATALOG
COLLATION_NAME
COLLATION_SCHEMA
COLLECT
COLUMN
COLUMN_NAME
COLUMNS
COMMAND_FUNCTION
COMMAND_FUNCTION_CODE
COMMIT
COMMITTED
CONDITION
CONDITION_NUMBER
CONFIDENCE
CONNECT
CONNECTION
CONNECTION_NAME
CONSTRAINT
CONSTRAINT_CATALOG
CONSTRAINT_NAME
CONSTRAINT_SCHEMA
CONSTRAINTS
CONSTRUCTOR
CONTAINS
CONTINUE
CONVERT
CORR
CORRESPONDING
COUNT
COVAR_POP
COVAR_SAMP
CREATE
CROSS
CSTREAM
CUBE
CUME_DIST
CUMULATE
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
CURSOR_NAME
CYCLE
DATA
DATABASE
DATE
DATETIME_INTERVAL_CODE
DATETIME_INTERVAL_PRECISION
DAY
DAYS
DEALLOCATE
DEC
DECADE
DECIMAL
DECLARE
DEFAULT
DEFAULTS
DEFERRABLE
DEFERRED
DEFINED
DEFINER
DEGREE
DELETE
DENSE_RANK
DEPTH
DEREF
DERIVED
DESC
DESCRIBE
DESCRIPTION
DESCRIPTOR
DETERMINISTIC
DIAGNOSTICS
DISALLOW
DISCONNECT
DISPATCH
DISTINCT
DISTRIBUTED
DOMAIN
DOUBLE
DOW
DOY
DROP
DYNAMIC
DYNAMIC_FUNCTION
DYNAMIC_FUNCTION_CODE
EACH
ELEMENT
ELSE
END
END-EXEC
EPOCH
EQUALS
ESCAPE
EVERY
EXCEPT
EXCEPTION
EXCLUDE
EXCLUDING
EXEC
EXECUTE
EXISTS
EXP
EXPLAIN
EXPORT
EXTEND
EXTENDED
EXTERNAL
EXTRACT
FALSE
FETCH
FILTER
FINAL
FIRST
FIRST_VALUE
FLOAT
FLOOR
FOLLOWING
FOR
FOREIGN
FORMAT
FORTRAN
FOUND
FRAC_SECOND
FREE
FROM
FULL
FUNCTION
FUNCTIONS
FUSION
G
GAP
GENERAL
GENERATED
GET
GLOBAL
GO
GOTO
GRANT
GRANTED
GRAPHVIZ
GROUP
GROUPING
HAVING
HIERARCHY
HOLD
HOP
HOPPING
HOUR
HOURS
IDENTITY
IF
IMMEDIATE
IMPLEMENTATION
IMPORT
IN
INCLUDING
INCREMENT
INDICATOR
INITIALLY
INNER
INOUT
INPUT
INSENSITIVE
INSERT
INSTANCE
INSTANTIABLE
INT
INTEGER
INTERSECT
INTERSECTION
INTERVAL
INTO
INVOKER
IS
ISOLATION
JAVA
JOIN
K
KEY
KEY_MEMBER
KEY_TYPE
LABEL
LANGUAGE
LARGE
LAST
LAST_VALUE
LATERAL
LEADING
LEFT
LENGTH
LEVEL
LIBRARY
LIKE
LIMIT
LIST
LN
LOAD
LOCAL
LOCALTIME
LOCALTIMESTAMP
LOCATOR
LOGICAL
LOWER
M
MAP
MATCH
MATCHED
MATERIALIZED
MAX
MAXVALUE
MEMBER
MERGE
MESSAGE_LENGTH
MESSAGE_OCTET_LENGTH
MESSAGE_TEXT
METADATA
METHOD
MICROSECOND
MILLENNIUM
MILLISECOND
MILLISECONDS
MIN
MINUTE
MINUTES
MINVALUE
MOD
MODIFIES
MODULE
MODULES
MONTH
MONTHS
MORE
MULTISET
MUMPS
NAME
NAMES
NATIONAL
NATURAL
NCHAR
NCLOB
NESTING
NEW
NEXT
NFC
NFD
NFKC
NFKD
NO
NONE
NORMALIZE
NORMALIZED
NOT
NULL
NULLABLE
NULLIF
NULLS
NUMBER
NUMERIC
OBJECT
OCTET_LENGTH
OCTETS
OF
OFFSET
OLD
ON
ONLY
OPEN
OPTION
OPTIONS
OR
ORDER
ORDERING
ORDINALITY
OTHERS
OUT
OUTER
OUTPUT
OVER
OVERLAPS
OVERLAY
OVERRIDING
OWNER
PAD
PARAMETER
PARAMETER_MODE
PARAMETER_NAME
PARAMETER_ORDINAL_POSITION
PARAMETER_SPECIFIC_CATALOG
PARAMETER_SPECIFIC_NAME
PARAMETER_SPECIFIC_SCHEMA
PARTIAL
PARTITION
PARTITIONS
PASCAL
PASSTHROUGH
PATH
PERCENT_RANK
PERCENTILE_CONT
PERCENTILE_DISC
PLACING
PLAN
PLI
POISSONIZED
POSITION
POWER
PRECEDING
PRECISION
PREPARE
PRESERVE
PRIMARY
PRIOR
PRIVILEGES
PROCEDURE
PROPERTIES
PUBLIC
QUARTER
QUERIES
QUERY
RANGE
RANK
RAW
READ
READS
REAL
RECURSIVE
REF
REFERENCES
REFERENCING
REGISTER
REGISTERED
REGR_AVGX
REGR_AVGY
REGR_COUNT
REGR_INTERCEPT
REGR_R2
REGR_SLOPE
REGR_SXX
REGR_SXY
REGR_SYY
REJECT
RELATION
RELATIVE
RELEASE
RENAME
REPEATABLE
REPLACE
REPLICAS
RESCALED
RESET
RESTART
RESTRICT
RESULT
RETURN
RETURNED_CARDINALITY
RETURNED_LENGTH
RETURNED_OCTET_LENGTH
RETURNED_SQLSTATE
RETURNS
REVOKE
RIGHT
ROLE
ROLLBACK
ROLLUP
ROUTINE
ROUTINE_CATALOG
ROUTINE_NAME
ROUTINE_SCHEMA
ROW
ROW_COUNT
ROW_NUMBER
ROWS
RUN
SAMPLE
SAVEPOINT
SCALE
SCHEMA
SCHEMA_NAME
SCHEMAS
SCOPE
SCOPE_CATALOGS
SCOPE_NAME
SCOPE_SCHEMA
SCRIPT
SCROLL
SEARCH
SECOND
SECONDS
SECTION
SECURITY
SELECT
SELF
SENSITIVE
SEQUENCE
SERIALIZABLE
SERVER
SERVER_NAME
SESSION
SESSION_USER
SET
SETS
SHOW
SIMILAR
SIMPLE
SIZE
SMALLINT
SOME
SOURCE
SPACE
SPECIFIC
SPECIFIC_NAME
SPECIFICTYPE
SQL
SQL_TSI_DAY
SQL_TSI_FRAC_SECOND
SQL_TSI_HOUR
SQL_TSI_MICROSECOND
SQL_TSI_MINUTE
SQL_TSI_MONTH
SQL_TSI_QUARTER
SQL_TSI_SECOND
SQL_TSI_WEEK
SQL_TSI_YEAR
SQLEXCEPTION
SQLSTATE
SQLWARNING
SQRT
START
STATE
STATEMENT
STATIC
STDDEV_POP
STDDEV_SAMP
STEP
STRATIFY
STREAM
STRING
STRUCT
STRUCTURE
STYLE
SUBCLASS_ORIGIN
SUBMULTISET
SUBSTITUTE
SUBSTRING
SUM
SYMMETRIC
SYSTEM
SYSTEM_USER
TABLE
TABLE_NAME
TABLES
TABLESAMPLE
TEMPORARY
TEXT
THEN
TIES
TIME
TIMESTAMP
TIMESTAMPADD
TIMESTAMPDIFF
TIMEZONE_HOUR
TIMEZONE_MINUTE
TINYINT
TO
TOP_LEVEL_COUNT
TRAILING
TRANSACTION
TRANSACTIONS_ACTIVE
TRANSACTIONS_COMMITTED
TRANSACTIONS_ROLLED_BACK
TRANSFORM
TRANSFORMS
TRANSLATE
TRANSLATION
TREAT
TRIGGER
TRIGGER_CATALOG
TRIGGER_NAME
TRIGGER_SCHEMA
TRIM
TRUE
TRY
TRY_CAST
TUMBLE
TUMBLING
TYPE
UESCAPE
UNBOUNDED
UNCOMMITTED
UNDER
UNION
UNIQUE
UNKNOWN
UNNAMED
UNNEST
UNSET
UPDATE
UPPER
UPSERT
USAGE
USE
USER
USER_DEFINED_TYPE_CATALOG
USER_DEFINED_TYPE_CODE
USER_DEFINED_TYPE_NAME
USER_DEFINED_TYPE_SCHEMA
USING
VALUE
VALUES
VAR_POP
VAR_SAMP
VARBINARY
VARCHAR
VARYING
VERSION
VIEW
WEEK
WHEN
WHENEVER
WHERE
WIDTH_BUCKET
WINDOW
WITH
WITHIN
WITHOUT
WORK
WRAPPER
WRITE
XML
YEAR
YEARS
Last updated