数据库关键字整理之——MariaDB数据库
关键字是指在数据库中有意义的字,通常是数据库内部使用, 不能用于命名用户的数据对象。 有的数据库还会详细划分,例如分为关键字,候选字,甚至更详细的分类。分类的标准例如有的是绝对不可以使用,有的通过一定手段例如添加双引号可以使用。
我们为了方便统一称之为关键字,通常用户编写的对象中使用关键字会造成错误或不确定的影响,为了避免这个问题,用户应该避免使用数据库的关键字(含保留字或其他保留别名等)。
这个系列主要整理了各大数据库的关键字,可以用于建库,建表,写存储过程,函数等场景避免冲突。最后会有个脚本工具用来检查是否使用关键字。9de7bb31d0644e7393039222babfed10
欢迎收藏。
MariaDB
ACCESSIBLE ACTION ADD ALL ALTER ANALYZE AND AS ASC ASENSITIVE
BEFORE BETWEEN BIGINT BINARY BIT BLOB BODY BOTH BY
CALL CASCADE CASE CHANGE CHAR CHARACTER CHECK COLLATE COLUMN CONDITION CONSTRAINT CONTINUE CONVERT CREATE CROSS CURRENT_DATE CURRENT_ROLE CURRENT_TIME CURRENT_TIMESTAMP CURRENT_USER CURSOR
DATABASE DATABASES DATE DAY_HOUR DAY_MICROSECOND DAY_MINUTE DAY_SECOND DEC DECIMAL DECLARE DEFAULT DELAYED DELETE DELETE_DOMAIN_ID DESC DESCRIBE DETERMINISTIC DISTINCT DISTINCTROW DIV DO_DOMAIN_IDS DOUBLE DROP DUAL
EACH ELSE ELSEIF ELSIF ENCLOSED ENUM ESCAPED EXCEPT EXISTS EXIT EXPLAIN
FALSE FETCH FLOAT FLOAT4 FLOAT8 FOR FORCE FOREIGN FROM FULLTEXT
GENERAL GOTO GRANT GROUP
HAVING HIGH_PRIORITY HISTORY HOUR_MICROSECOND HOUR_MINUTE HOUR_SECOND
IF IGNORE IGNORE_DOMAIN_IDS IGNORE_SERVER_IDS IN INDEX INFILE INNER INOUT INSENSITIVE INSERT INT INT1 INT2 INT3 INT4 INT8 INTEGER INTERSECT INTERVAL INTO IS ITERATE
JOIN
KEY KEYS KILL
LEADING LEAVE LEFT LIKE LIMIT LINEAR LINES LOAD LOCALTIME LOCALTIMESTAMP LOCK LONG LONGBLOB LONGTEXT LOOP LOW_PRIORITY
MASTER_HEARTBEAT_PERIOD MASTER_SSL_VERIFY_SERVER_CERT MATCH MAXVALUE MEDIUMBLOB MEDIUMINT MEDIUMTEXT MIDDLEINT MINUS MINUTE_MICROSECOND MINUTE_SECOND MOD MODIFIES
NATURAL NO NO_WRITE_TO_BINLOG NOT NULL NUMERIC
OFFSET ON OPTIMIZE OPTION OPTIONALLY OR ORDER OTHERS OUT OUTER OUTFILE OVER
PACKAGE PAGE_CHECKSUM PARSE_VCOL_EXPR PARTITION PERIOD POSITION PRECISION PRIMARY PROCEDURE PURGE
RAISE RANGE READ READ_WRITE READS REAL RECURSIVE REF_SYSTEM_ID REFERENCES REGEXP RELEASE RENAME REPEAT REPLACE REQUIRE RESIGNAL RESTRICT RETURN RETURNING REVOKE RIGHT RLIKE ROWNUM ROWS ROWTYPE
SCHEMA SCHEMAS SECOND_MICROSECOND SELECT SENSITIVE SEPARATOR SET SHOW SIGNAL SLOW SMALLINT SPATIAL SPECIFIC SQL SQL_BIG_RESULT SQL_CALC_FOUND_ROWS SQL_SMALL_RESULT SQLEXCEPTION SQLSTATE SQLWARNING SSL STARTING STATS_AUTO_RECALC STATS_PERSISTENT STATS_SAMPLE_PAGES STRAIGHT_JOIN SYSDATE SYSTEM SYSTEM_TIME
TABLE TERMINATED TEXT THEN TIME TIMESTAMP TINYBLOB TINYINT TINYTEXT TO TRAILING TRIGGER TRUE
UNDO UNION UNIQUE UNLOCK UNSIGNED UPDATE USAGE USE USING UTC_DATE UTC_TIME UTC_TIMESTAMP
VALUES VARBINARY VARCHAR VARCHARACTER VARYING VERSIONING
WHEN WHERE WHILE WINDOW WITH WITHOUT WRITE
XOR
YEAR_MONTH
ZEROFILL