Description\n-----------\n\nThe following is a list of all reserved words in MariaDB.\n\nReserved words cannot be used as Identifiers, unless they are quoted.\n\nThe definitive list of reserved words for each version can be found by examining the sql/lex.h and sql/sql_yacc.yy files.\n\nReserved Words\n\n| Keyword                           |\n| --------------------------------- |\n| ACCESSIBLE                        |\n| ADD                               |\n| ALL                               |\n| ALTER                             |\n| ANALYZE                           |\n| AND                               |\n| AS                                |\n| ASC                               |\n| ASENSITIVE                        |\n| BEFORE                            |\n| BETWEEN                           |\n| BIGINT                            |\n| BINARY                            |\n| BLOB                              |\n| BOTH                              |\n| BY                                |\n| CALL                              |\n| CASCADE                           |\n| CASE                              |\n| CHANGE                            |\n| CHAR                              |\n| CHARACTER                         |\n| CHECK                             |\n| COLLATE                           |\n| COLUMN                            |\n| CONDITION                         |\n| CONSTRAINT                        |\n| CONTINUE                          |\n| CONVERT                           |\n| CREATE                            |\n| CROSS                             |\n| CURRENT_DATE                     |\n| CURRENT_ROLE                     |\n| CURRENT_TIME                     |\n| CURRENT_TIMESTAMP                |\n| CURRENT_USER                     |\n| CURSOR                            |\n| DATABASE                          |\n| DATABASES                         |\n| DAY_HOUR                         |\n| DAY_MICROSECOND                  |\n| DAY_MINUTE                       |\n| DAY_SECOND                       |\n| DEC                               |\n| DECIMAL                           |\n| DECLARE                           |\n| DEFAULT                           |\n| DELAYED                           |\n| DELETE                            |\n| DELETE_DOMAIN_ID                |\n| DESC                              |\n| DESCRIBE                          |\n| DETERMINISTIC                     |\n| DISTINCT                          |\n| DISTINCTROW                       |\n| DIV                               |\n| DO_DOMAIN_IDS                   |\n| DOUBLE                            |\n| DROP                              |\n| DUAL                              |\n| EACH                              |\n| ELSE                              |\n| ELSEIF                            |\n| ENCLOSED                          |\n| ESCAPED                           |\n| EXCEPT                            |\n| EXISTS                            |\n| EXIT                              |\n| EXPLAIN                           |\n| FALSE                             |\n| FETCH                             |\n| FLOAT                             |\n| FLOAT4                            |\n| FLOAT8                            |\n| FOR                               |\n| FORCE                             |\n| FOREIGN                           |\n| FROM                              |\n| FULLTEXT                          |\n| GENERAL                           |\n| GRANT                             |\n| GROUP                             |\n| HAVING                            |\n| HIGH_PRIORITY                    |\n| HOUR_MICROSECOND                 |\n| HOUR_MINUTE                      |\n| HOUR_SECOND                      |\n| IF                                |\n| IGNORE                            |\n| IGNORE_DOMAIN_IDS               |\n| IGNORE_SERVER_IDS               |\n| IN                                |\n| INDEX                             |\n| INFILE                            |\n| INNER                             |\n| INOUT                             |\n| INSENSITIVE                       |\n| INSERT                            |\n| INT                               |\n| INT1                              |\n| INT2                              |\n| INT3                              |\n| INT4                              |\n| INT8                              |\n| INTEGER                           |\n| INTERSECT                         |\n| INTERVAL                          |\n| INTO                              |\n| IS                                |\n| ITERATE                           |\n| JOIN                              |\n| KEY                               |\n| KEYS                              |\n| KILL                              |\n| LEADING                           |\n| LEAVE                             |\n| LEFT                              |\n| LIKE                              |\n| LIMIT                             |\n| LINEAR                            |\n| LINES                             |\n| LOAD                              |\n| LOCALTIME                         |\n| LOCALTIMESTAMP                    |\n| LOCK                              |\n| LONG                              |\n| LONGBLOB                          |\n| LONGTEXT                          |\n| LOOP                              |\n| LOW_PRIORITY                     |\n| MASTER_HEARTBEAT_PERIOD         |\n| MASTER_SSL_VERIFY_SERVER_CERT |\n| MATCH                             |\n| MAXVALUE                          |\n| MEDIUMBLOB                        |\n| MEDIUMINT                         |\n| MEDIUMTEXT                        |\n| MIDDLEINT                         |\n| MINUTE_MICROSECOND               |\n| MINUTE_SECOND                    |\n| MOD                               |\n| MODIFIES                          |\n| NATURAL                           |\n| NOT                               |\n| NO_WRITE_TO_BINLOG             |\n| NULL                              |\n| NUMERIC                           |\n| OFFSET (> 10.6)                   |\n| ON                                |\n| OPTIMIZE                          |\n| OPTION                            |\n| OPTIONALLY                        |\n| OR                                |\n| ORDER                             |\n| OUT                               |\n| OUTER                             |\n| OUTFILE                           |\n| OVER                              |\n| PAGE_CHECKSUM                    |\n| PARSE_VCOL_EXPR                 |\n| PARTITION                         |\n| PRECISION                         |\n| PRIMARY                           |\n| PROCEDURE                         |\n| PURGE                             |\n| RANGE                             |\n| READ                              |\n| READS                             |\n| READ_WRITE                       |\n| REAL                              |\n| RECURSIVE                         |\n| REF_SYSTEM_ID                   |\n| REFERENCES                        |\n| REGEXP                            |\n| RELEASE                           |\n| RENAME                            |\n| REPEAT                            |\n| REPLACE                           |\n| REQUIRE                           |\n| RESIGNAL                          |\n| RESTRICT                          |\n| RETURN                            |\n| RETURNING                         |\n| REVOKE                            |\n| RIGHT                             |\n| RLIKE                             |\n| ROW_NUMBER (> 10.7)              |\n| ROWS                              |\n| SCHEMA                            |\n| SCHEMAS                           |\n| SECOND_MICROSECOND               |\n| SELECT                            |\n| SENSITIVE                         |\n| SEPARATOR                         |\n| SET                               |\n| SHOW                              |\n| SIGNAL                            |\n| SLOW                              |\n| SMALLINT                          |\n| SPATIAL                           |\n| SPECIFIC                          |\n| SQL                               |\n| SQLEXCEPTION                      |\n| SQLSTATE                          |\n| SQLWARNING                        |\n| SQL_BIG_RESULT                  |\n| SQL_CALC_FOUND_ROWS            |\n| SQL_SMALL_RESULT                |\n| SSL                               |\n| STARTING                          |\n| STATS_AUTO_RECALC               |\n| STATS_PERSISTENT                 |\n| STATS_SAMPLE_PAGES              |\n| STRAIGHT_JOIN                    |\n| TABLE                             |\n| TERMINATED                        |\n| THEN                              |\n| TINYBLOB                          |\n| TINYINT                           |\n| TINYTEXT                          |\n| TO                                |\n| TRAILING                          |\n| TRIGGER                           |\n| TRUE                              |\n| UNDO                              |\n| UNION                             |\n| UNIQUE                            |\n| UNLOCK                            |\n| UNSIGNED                          |\n| UPDATE                            |\n| USAGE                             |\n| USE                               |\n| USING                             |\n| UTC_DATE                         |\n| UTC_TIME                         |\n| UTC_TIMESTAMP                    |\n| VALUES                            |\n| VARBINARY                         |\n| VARCHAR                           |\n| VARCHARACTER                      |\n| VARYING                           |\n| VECTOR (> 11.6)                   |\n| WHEN                              |\n| WHERE                             |\n| WHILE                             |\n| WINDOW                            |\n| WITH                              |\n| WRITE                             |\n| XOR                               |\n| YEAR_MONTH                       |\n| ZEROFILL                          |\n\nExceptions\n\nSome keywords are exceptions for historical reasons, and are permitted as unquoted identifiers. These include:\n\n| Keyword                                                             |\n| ------------------------------------------------------------------- |\n| ACTION                                                              |\n| BIT                   |\n| DATE           |\n| ENUM                  |\n| NO                                                                  |\n| TEXT                  |\n| TIME           |\n| TIMESTAMP |\n\nOracle Mode\n\nIn Oracle mode, there are a number of extra reserved words:\n\n| Keyword          |\n| ---------------- |\n| BODY             |\n| ELSIF            |\n| GOTO             |\n| HISTORY          |\n| MINUS (> 10.6.0) |\n| OTHERS           |\n| PACKAGE          |\n| PERIOD           |\n| RAISE            |\n| ROWNUM           |\n| ROWTYPE          |\n| SYSDATE          |\n| SYSTEM           |\n| SYSTEM_TIME     |\n| VERSIONING       |\n| WITHOUT          |\n\nContextual Keywords and Parser Limitations\n\nThe lists above indicate words that are always reserved and must be quoted. Some keywords, though, are reserved for specific contexts. In most SQL statements, they operate normally, but in some cases, they activate unique parser rules.\n\nThe Oracle mode term SYSTEM is a prime example. Although it is not a fully reserved word, the parser expects the VERSIONING keyword to follow (as part of the SYSTEM VERSIONING clause for system-versioned tables), which results in a syntax error in an ALTER TABLE ... ADD command.\n\nExample of unexpected behavior\n\nThe following examples show how the keyword SYSTEM behaves as an identifier:\n\n``sql\nCREATE TABLE t1 (system INT);\n`\n\nThis statement works because SYSTEM is a valid column name in this situation.\n\nInvalid usage\n\n`sql\nALTER TABLE t1 ADD system VARCHAR(64);\n`\n\nThis statement fails due to a syntax error.\n\n`\nERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'VARCHAR(64)' at line 1\n`\n\nTo avoid any conflict, always quote such keywords when using them as identifiers in statements.\n\n`\nALTER TABLE t1 ADD system VARCHAR(64);\n`\n\nIt is recommended that all identifiers listed as keywords (including those indicated as non-reserved or version-specific) be quoted for maximum compatibility and to prevent unexpected parser errors, especially in ALTER statements.\n\nFunction Names\n\nIf the IGNORE_SPACE` SQL_MODE flag is set, function names become reserved words.\n\nURL: https://mariadb.com/docs/server/reference/sql-structure/sql-language-structure/reserved-words