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 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:
H
HASH
HAVING
T
THEN
TIES
TO
TRAN
TRANSACTION
TRIGGER
TRUE
TRUNCATE