SQL distinguishes between reserved and non-reserved keywords. According to the standard, reserved keywords are the only real keywords; they are never allowed as identifiers. Non-reserved keywords only have a special meaning in particular contexts and can be used as identifiers in other contexts. Most non-reserved keywords are actually the names of built-in tables and functions specified by SQL. The concept of non-reserved keywords essentially only exists to declare that some predefined meaning is attached to a word in some contexts.
??
a keyword not part of sys.keywords
!!
a keyword not in PG
Keywords reserved in the various SQL standards and freely used by MonetDB
Keyword | MonetDB | SQL:2016 | SQL:2011 | SQL-92 |
---|---|---|---|---|
ABS | reserved | reserved | ||
ACOS | reserved | |||
ASIN | reserved | |||
ASSERTION | non-reserved | non-reserved | reserved | |
ATAN | reserved | |||
BOOLEAN | reserved | reserved | ||
BOTH | reserved | reserved | reserved | |
CALLED | reserved | reserved | ||
CARDINALITY | reserved | reserved | ||
COS | reserved | |||
COSH | reserved | |||
COUNT | reserved | reserved | reserved | |
COVAR_POP | reserved | reserved | ||
COVAR_SAMP | reserved | reserved | ||
CUME_DIST | reserved | reserved | ||
CURRENT_CATALOG | reserved | reserved | reserved | |
CURRENT_DEFAULT_TRANSFORM_GROUP | reserved | reserved | ||
DESCRIBE | reserved | reserved | reserved | |
ELSEIF | reserved | reserved | reserved | |
FETCH | reserved | reserved | reserved | |
FLOAT | reserved | reserved | reserved | |
FLOOR | reserved | reserved | ||
INDICATOR | reserved | reserved | reserved | |
INTERSECTION | reserved | reserved | ||
LEAD | reserved | reserved | ||
LEADING | reserved | reserved | reserved | |
LOWER | reserved | reserved | reserved | |
MEMBER | reserved | reserved | ||
MIN | reserved | reserved | reserved | |
MINUTE | reserved | reserved | reserved | |
MOD | reserved | reserved | ||
NONE | reserved | reserved | ||
NORMALIZE | reserved | reserved | ||
OMIT | reserved | |||
ONE | reserved | |||
OUT | reserved | reserved | ||
OUTPUT | non-reserved | non-reserved | reserved | |
OVERLAPS | reserved | reserved | reserved | |
OVERLAY | reserved | reserved | ||
PARAMETER | reserved | reserved | ||
PATTERN | reserved | |||
PER | reserved | |||
PERCENT | reserved | reserved | ||
PERCENTILE_CONT | reserved | reserved | ||
PERCENTILE_DISC | reserved | reserved | ||
PERCENT_RANK | reserved | reserved | ||
PORTION | reserved | reserved | ||
POSITION | reserved | reserved | reserved | |
POSITION_REGEX | reserved | reserved | ||
POWER | reserved | reserved | ||
PRIOR | non-reserved | non-reserved | reserved | |
READS | reserved | reserved | ||
RANK | reserved | reserved | ||
RECURSIVE | reserved | reserved | ||
REF | reserved | reserved | ||
REGR_AVGX | reserved | reserved | ||
REGR_AVGY | reserved | reserved | ||
REGR_COUNT | reserved | reserved | ||
REGR_INTERCEPT | reserved | reserved | ||
REGR_R2 | reserved | reserved | ||
REGR_SLOPE | reserved | reserved | ||
REGR_SXX | reserved | reserved | ||
REGR_SXY | reserved | reserved | ||
REGR_SYY | reserved | reserved | ||
RELATIVE | non-reserved | non-reserved | reserved | |
RELEASE | reserved | reserved | ||
RESULT | reserved | reserved | ||
ROW | reserved | reserved | ||
ROW_NUMBER | reserved | reserved | ||
SCOPE | reserved | reserved | ||
SCROLL | reserved | reserved | reserved | |
SEARCH | reserved | reserved | ||
SECTION | non-reserved | reserved | ||
SEEK | reserved | |||
SENSITIVE | reserved | reserved | ||
SHOW | reserved | |||
SIMILAR | reserved | reserved | ||
SIN | reserved | |||
SINH | reserved | |||
SIZE | non-reserved | non-reserved | reserved | |
SKIP | reserved | |||
SPACE | non-reserved | reserved | ||
SPECIFIC | reserved | reserved | ||
SPECIFICTYPE | reserved | reserved | ||
SPECIFIC_NAME | non-reserved | non-reserved | ||
STATIC | reserved | reserved | ||
STDDEV_POP | reserved | reserved | ||
STDDEV_SAMP | reserved | reserved | ||
SUBMULTISET | reserved | reserved | ||
SUBSET | reserved | |||
SUBSTRING_REGE | reserved | reserved | ||
SUCCEEDS | reserved | reserved | ||
SUM | reserved | reserved | reserved | |
SYSTEM | reserved | reserved | ||
SYSTEM_TIME | reserved | reserved | ||
SYSTEM_USER | reserved | reserved | reserved | |
TABLESAMPLE | reserved | reserved | ||
TAN | reserved | |||
TANH | reserved | |||
TIMEZONE_HOUR | reserved | reserved | reserved | |
TIMEZONE_MINUTE | reserved | reserved | reserved | |
TRAILING | reserved | reserved | reserved | |
TRANSLATE | reserved | reserved | reserved | |
TRANSLATE_REGEX | reserved | reserved | ||
TRANSLATION | reserved | reserved | reserved | |
TREAT | reserved | reserved | ||
UNKNOWN | reserved | reserved | reserved | |
UPPER | reserved | reserved | reserved | |
USAGE | non-reserved | non-reserved | reserved | |
VALUE | reserved | reserved | reserved | |
WIDTH_BUCKET | reserved | reserved | ||
XMLSERIALIZE | reserved | reserved | ||
XMLTABLE | reserved | reserved |
Keyword | SQL:2016 | SQL:2011 | SQL-92 |
---|---|---|---|
AS | reserved | reserved | reserved |
BY | reserved | reserved | reserved |
CURRENT_PATH | reserved | reserved | |
CURRENT_ROLE | reserved | reserved | reserved |
CURRENT_TRANSFORM_GROUP_FOR_TYPE | reserved | reserved | |
FIRST | non-reserved | non-reserved | reserved |
JSON | |||
ROLE | |||
SQL | reserved | reserved | reserved |
SQLCODE | |||
SQLERROR | |||
SQLEXCEPTION | reserved | reserved | |
SQLSTATE | reserved | reserved | |
SQLWARNING | reserved | reserved | |
SQRT | reserved | reserved | |
TRIM | reserved | reserved | |
UESCAPE | reserved | reserved | |
VALUE_OF | reserved | reserved | |
VARBINARY | reserved | reserved | |
VARIADIC | reserved | ||
VAR_POP | reserved | reserved | |
VAR_SAMP | reserved | reserved | |
VERBOSE | |||
VERSIONING | reserved | reserved | |
WHENEVER | reserved | reserved | |
WITHOUT | reserved | reserved | |
WITHIN | reserved | reserved | |
XML | reserved | reserved | |
XMLATTRIBUTES | reserved | reserved | |
XMLBINARY | reserved | reserved | |
XMLCAST | reserved | reserved | |
XMLEXISTS | reserved | reserved | |
XMLITERATE | reserved | reserved |
Keyword | SQL:2016 | SQL:2011 | SQL-92 | |
---|---|---|---|---|
ADD | non-reserved | non-reserved | reserved | |
ADMIN | non-reserved | non-reserved | ||
AFTER | non-reserved | non-reserved | non-reserved | |
AGGREGATE | non-reserved | |||
ALL | reserved | reserved | reserved | |
ALTER | non-reserved | reserved | reserved | |
ALWAYS | non-reserved | non-reserved | non-reserved | |
ANALYZE | reserved | |||
AND | reserved | reserved | reserved | |
ANY | reserved | reserved | reserved | |
ASC | non-reserved | non-reserved | reserved | |
ASYMMETRIC | reserved | reserved | reserved | |
AT | reserved | reserved | reserved | |
ATOMIC | non-reserved | reserved | reserved | |
AUTHORIZATION | reserved | reserved | reserved | |
AUTO_INCREMENT | ||||
BEGIN | reserved | reserved | reserved | |
BEST | ||||
BETWEEN | reserved | reserved | reserved | |
BIG | reserved | reserved | ||
BIGINT | reserved | reserved | ||
BIGSERIAL | reserved | reserved | ||
BINARY | reserved | reserved | ||
BLOB | reserved | reserved | ||
BY | reserved | reserved | reserved | |
C | non-reserved | non-reserved | non-reserved | |
CACHE | ||||
CALL | reserved | reserved | ||
CASCADE | non-reserved | non-reserved | reserved | |
CASE | reserved | reserved | reserved | |
CAST | reserved | reserved | reserved | |
CENTURY | ||||
CHAIN | non-reserved | non-reserved | ||
CHAR | reserved | reserved | reserved | |
CHARACTER | reserved | reserved | reserved | |
CHECK | reserved | reserved | reserved | |
CLIENT | ||||
CLOB | reserved | reserved | ||
COALESCE | reserved | reserved | reserved | |
COLUMN | reserved | reserved | reserved | |
COMMENT | ||||
COMMIT | reserved | reserved | reserved | |
COMMITTED | reserved | reserved | reserved | |
CONSTRAINT | non-reserved | non-reserved | non-reserved | |
CONTINUE | non-reserved | non-reserved | reserved | |
CONVERT | reserved | reserved | reserved | |
COPY | reserved | |||
CORRESPONDING | reserved | reserved | reserved | |
CREATE | reserved | reserved | reserved | |
CROSS | reserved | reserved | reserved | |
CUBE | reserved | reserved | ||
CURRENT | reserved | reserved | reserved | |
CURRENT_DATE | reserved | reserved | reserved | |
CURRENT_SCHEMA | reserved | reserved | ||
CURRENT_TIME | reserved | reserved | reserved | |
CURRENT_TIMESTAMP | reserved | reserved | reserved | |
CURRENT_USER | reserved | reserved | reserved | |
CYCLE | reserved | reserved | ||
DATA | non-reserved | non-reserved | non-reserved | |
DATE | reserved | reserved | reserved | |
DAY | reserved | reserved | reserved | |
DEALLOCATE | reserved | reserved | reserved | |
DEBUG | ||||
DEC | reserved | reserved | reserved | |
DECADE | ||||
DECIMAL | reserved | reserved | reserved | |
DECLARE | reserved | reserved | reserved | |
DEFAULT | reserved | reserved | reserved | |
DELIMITERS | ||||
DESC | non-reserved | non-reserved | reserved | |
DIAGNOSTICS | reserved | |||
DISTINCT | reserved | reserved | reserved | |
DO | ||||
DOUBLE | reserved | reserved | reserved | |
DOW | ||||
DOY | ||||
DROP | reserved | reserved | reserved | |
EACH | reserved | reserved | ||
EFFORT | ||||
ELSE | reserved | reserved | reserved | |
ENCRYPTED | ||||
END | reserved | reserved | reserved | |
ENDIAN | ||||
EPOCH | ||||
ESCAPE | reserved | reserved | reserved | |
EVERY | reserved | reserved | ||
EXCEPT | reserved | reserved | reserved | |
EXCLUDE | non-reserved | non-reserved | non-reserved | |
EXEC | reserved | reserved | reserved | |
EXECUTE | reserved | reserved | reserved | |
EXISTS | reserved | reserved | reserved | |
EXPLAIN | non-reserved | |||
EXTERNAL | reserved | reserved | reserved | |
EXTRACT | reserved | reserved | reserved | |
FALSE | reserved | reserved | reserved | |
FOLLOWING | non-reserved | non-reserved | ||
FOR | reserved | reserved | reserved | |
FOREIGN | reserved | reserved | reserved | |
FROM | reserved | reserved | reserved | |
FULL | reserved | reserved | reserved | |
FUNCTION | reserved | reserved | ||
FWF | ||||
GENERATED | non-reserved | non-reserved | ||
GLOBAL | reserved | reserved | reserved | |
GRANT | reserved | reserved | reserved | |
GROUP | reserved | reserved | reserved | |
GROUPING | reserved | reserved | ||
GROUPS | reserved | reserved | ||
HAVING | reserved | reserved | reserved | |
IDENTITY | reserved | reserved | reserved | |
IF | ||||
ILIKE | ||||
IN | reserved | reserved | reserved | |
INCREMENT | non-reserved | non-reserved | ||
INDEX | ||||
INNER | reserved | reserved | reserved | |
INSERT | reserved | reserved | ||
INT | reserved | reserved | reserved | |
INTEGER | reserved | reserved | reserved | |
INTERSECT | reserved | reserved | reserved | |
INTERVAL | reserved | reserved | reserved | |
INTO | reserved | reserved | reserved | |
IS | reserved | reserved | reserved | |
ISOLATION | non-reserved | reserved | ||
JOIN | reserved | reserved | reserved | |
KEY | non-reserved | non-reserved | reserved | |
LANGUAGE | reserved | reserved | reserved | |
LARGE | reserved | reserved | ||
LAST | on-reserved | non-reserved | reserved | |
LATERAL | reserved | reserved | reserved | |
LEFT | reserved | reserved | reserved | |
LEVEL | non-reserved | non-reserved | reserved | |
LIKE | reserved | reserved | reserved | |
LIMIT | non-reserved | non-reserved | ||
LITTLE | ||||
LOADER | ||||
LOCAL | reserved | reserved | ||
LOCALTIME | reserved | reserved | ||
LOCALTIMESTAMP | reserved | reserved | ||
LOCKED | ||||
MATCH | reserved | reserved | ||
MATCHED | non-reserved | non-reserved | ||
MAX | reserved | reserved | ||
MAXVALUE | non-reserved | non-reserved | ||
MEDIUMINT | ||||
MERGE | reserved | reserved | ||
MINVALUE | non-reserved | non-reserved | ||
MONTH | reserved | reserved | reserved | |
NAME | non-reserved | non-reserved | ||
NATIVE | ||||
NATURAL | reserved | reserved | reserved | |
NEW | reserved | reserved | ||
NEXT | non-reserved | non-reserved | reserved | |
NO | reserved | reserved | reserved | |
NOT | reserved | reserved | reserved | |
NTH_VALUE | reserved | reserved | ||
NTILE | reserved | reserved | ||
NULL | reserved | reserved | reserved | |
NULLIF | reserved | reserved | reserved | |
NULLS | non-reserved | non-reserved | ||
NUMERIC | reserved | reserved | reserved | |
OBJECT | non-reserved | non-reserved | ||
OF | reserved | reserved | reserved | |
OFFSET | reserved | reserved | ||
OLD | reserved | reserved | ||
ON | reserved | reserved | reserved | |
ONLY | reserved | reserved | reserved | |
OPTION | non-reserved | non-reserved | reserved | |
OPTIONS | non-reserved | non-reserved | ||
OR | reserved | reserved | reserved | |
ORDER | reserved | reserved | reserved | |
OTHERS | non-reserved | non-reserved | ||
OUTER | reserved | reserved | reserved | |
OVER | reserved | reserved | ||
PARTIAL | non-reserved | non-reserved | reserved | |
PARTITION | reserved | reserved | ||
PASSWORD | ||||
PLAN | non-reserved | |||
PRECEDES | reserved | reserved | ||
PRECEDING | ||||
PRECISION | reserved | reserved | reserved | |
PREP | ||||
PREPARE | reserved | reserved | reserved | |
PRESERVE | non-reserved | reserved | ||
PRIMARY | reserved | reserved | reserved | |
PRIVILEGES | non-reserved | non-reserved | reserved | |
PROCEDURE | reserved | reserved | reserved | |
PUBLIC | non-reserved | non-reserved | reserved | |
QUARTER | ||||
RANGE | reserved | reserved | ||
READ | non-reserved | non-reserved | reserved | |
REAL | reserved | reserved | reserved | |
REFERENCES | reserved | reserved | reserved | |
REFERENCING | reserved | reserved | ||
REMOTE | ||||
RENAME | ||||
REPEATABLE | non-reserved | non-reserved | ||
REPLACE | ||||
REPLICA | ||||
RESTART | non-reserved | |||
RESTRICT | non-reserved | non-reserved | reserved | |
RETURNS | reserved | reserved | ||
REVOKE | reserved | reserved | reserved | |
RIGHT | reserved | reserved | reserved | |
ROLLBACK | reserved | reserved | reserved | |
ROLLUP | reserved | reserved | ||
ROWS | reserved | reserved | reserved | |
SAMPLE | ||||
SAVEPOINT | reserved | reserved | ||
SCHEMA | non-reserved | non-reserved | reserved | |
SECOND | reserved | reserved | reserved | |
SELECT | reserved | reserved | reserved | |
SEQUENCE | non-reserved | non-reserved | ||
SERIAL | ||||
SERIALIZABLE | non-reserved | non-reserved | non-reserved | |
SERVER | non-reserved | non-reserved | ||
SESSION | non-reserved | non-reserved | reserved | |
SESSION_USER | reserved | reserved | reserved | |
SET | reserved | reserved | reserved | |
SETS | ||||
SIMPLE | ||||
SMALLINT | reserved | reserved | reserved | |
SOME | reserved | reserved | reserved | |
SPLIT_PART | ||||
START | reserved | reserved | ||
STATEMENT | non-reserved | non-reserved | ||
STDIN | ||||
STDOUT | ||||
STORAGE | ||||
STRING | ||||
SUBSTRING | reserved | reserved | reserved | |
SYMMETRIC | reserved | reserved | reserved | |
TABLE | reserved | reserved | reserved | |
TEMP | ||||
TEMPORARY | non-reserved | non-reserved | reserved | |
TEXT | ||||
THEN | reserved | reserved | reserved | |
TIES | non-reserved | non-reserved | ||
TIME | reserved | reserved | reserved | |
TIMESTAMP | reserved | reserved | reserved | |
TO | reserved | reserved | reserved | |
TRANSACTION | ||||
TRIGGER | reserved | reserved | ||
TRUE | reserved | reserved | reserved | |
TRUNCATE | reserved | reserved | ||
TYPE | non-reserved | non-reserved | non-reserved | |
UNBOUNDED | non-reserved | non-reserved | ||
UNCOMMITTED | non-reserved | non-reserved | non-reserved | |
UNENCRYPTED | ||||
UNION | reserved | reserved | reserved | |
UNIQUE | reserved | reserved | reserved | |
UPDATE | reserved | reserved | reserved | |
UNNEST | reserved | reserved | ||
USER | reserved | reserved | reserved | |
USING | reserved | reserved | reserved | |
VALUES | reserved | reserved | reserved | |
VARCHAR | reserved | reserved | reserved | |
VARYING | reserved | reserved | reserved | |
VIEW | non-reserved | non-reserved | reserved | |
WHEN | reserved | reserved | reserved | |
WHERE | reserved | reserved | reserved | |
WHILE | ||||
WINDOW | reserved | reserved | ||
WITH | reserved | reserved | reserved | |
WORK | ||||
WRITE | non-reserved | non-reserved | reserved | |
XMLAGG | reserved | reserved | ||
XMLCOMMENT | reserved | reserved | ||
XMLCONCAT | reserved | reserved | ||
XMLDOCUMENT | reserved | reserved | ||
XMLELEMENT | reserved | reserved | ||
XMLFOREST | reserved | reserved | ||
XMLNAMESPACES | reserved | reserved | ||
XMLPARSE | reserved | reserved | ||
XMLPI | reserved | reserved | ||
XMLQUERY | reserved | reserved | ||
XMLSCHEMA | ||||
XMLTEXT | reserved | reserved | ||
XMLVALIDATE | reserved | reserved | ||
YEAR | reserved | reserved | reserved | |
ZONE | non-reserved | non-reserved | reserved |