Reserved Words

  • reference
    +
    SQL++ defines an extensive list of keywords that are reserved words. You cannot use these keywords as identifiers unless you escape them. All of the SQL++ keywords are case insensitive.

    Some of the keywords are not currently implemented but are reserved for future use.

    Using Reserved Words as Identifiers

    SQL++ allows escaped identifiers to overlap with keywords. To use a reserved word as an identifier, you must escape it by enclosing the reserved word inside backticks (``). For example, if your JSON document contains a field named index, you can use it in your queries by escaping it like this:

    {
        "age": "42",
        "index": 27,
        "name": "Elvis"
    }
    CREATE INDEX myindex ON default(`index`) USING GSI;

    SQL++ Reserved Words

    The following keywords are reserved and cannot be used as unescaped identifiers:

    _INDEX_CONDITION

    _INDEX_KEY

    ADVISE

    ALL

    ALTER

    ANALYZE

    AND

    ANY

    ARRAY

    AS

    ASC

    AT

    BEGIN

    BETWEEN

    BINARY

    BOOLEAN

    BREAK

    BUCKET

    BUILD

    BY

    CACHE

    CALL

    CASE

    CAST

    CLUSTER

    COLLATE

    COLLECTION

    COMMIT

    COMMITTED

    CONNECT

    CONTINUE

    CORRELATED

    COVER

    CREATE

    CURRENT

    CYCLE

    DATABASE

    DATASET

    DATASTORE

    DECLARE

    DECREMENT

    DEFAULT

    DELETE

    DERIVED

    DESC

    DESCRIBE

    DISTINCT

    DO

    DROP

    EACH

    ELEMENT

    ELSE

    END

    ESCAPE

    EVERY

    EXCEPT

    EXCLUDE

    EXECUTE

    EXISTS

    EXPLAIN

    FALSE

    FETCH

    FILTER

    FIRST

    FLATTEN

    FLATTEN_KEYS

    FLUSH

    FOLLOWING

    FOR

    FORCE

    FROM

    FTS

    FUNCTION

    GOLANG

    GRANT

    GROUP

    GROUPS

    GSI

    HASH

    HAVING

    IF

    IGNORE

    ILIKE

    IN

    INCLUDE

    INCREMENT

    INDEX

    INFER

    INLINE

    INNER

    INSERT

    INTERSECT

    INTO

    IS

    ISOLATION

    JAVASCRIPT

    JOIN

    KEY

    KEYS

    KEYSPACE

    KNOWN

    LANGUAGE

    LAST

    LATERAL

    LEFT

    LET

    LETTING

    LEVEL

    LIKE

    LIMIT

    LSM

    MAP

    MAPPING

    MATCHED

    MATERIALIZED

    MAXVALUE

    MERGE

    MINVALUE

    MISSING

    NAMESPACE

    NEST

    NEXT

    NEXTVAL

    NL

    NO

    NOT

    NTH_VALUE

    NULL

    NULLS

    NUMBER

    OBJECT

    OFFSET

    ON

    OPTION

    OPTIONS

    OR

    ORDER

    OTHERS

    OUTER

    OVER

    PARSE

    PARTITION

    PASSWORD

    PATH

    POOL

    PRECEDING

    PREPARE

    PREV

    PREVIOUS

    PREVVAL

    PRIMARY

    PRIVATE

    PRIVILEGE

    PROBE

    PROCEDURE

    PUBLIC

    RANGE

    RAW

    READ

    REALM

    RECURSIVE

    REDUCE

    RENAME

    REPLACE

    RESPECT

    RESTART

    RESTRICT

    RETURN

    RETURNING

    REVOKE

    RIGHT

    ROLE

    ROLLBACK

    ROW

    ROWS

    SATISFIES

    SAVEPOINT

    SCHEMA

    SCOPE

    SELECT

    SELF

    SEQUENCE

    SET

    SHOW

    SOME

    START

    STATISTICS

    STRING

    SYSTEM

    THEN

    TIES

    TO

    TRAN

    TRANSACTION

    TRIGGER

    TRUE

    TRUNCATE

    UNBOUNDED

    UNDER

    UNION

    UNIQUE

    UNKNOWN

    UNNEST

    UNSET

    UPDATE

    UPSERT

    USE

    USER

    USERS

    USING

    VALIDATE

    VALUE

    VALUED

    VALUES

    VECTOR

    VIA

    VIEW

    WHEN

    WHERE

    WHILE

    WINDOW

    WITH

    WITHIN

    WORK

    XOR