(资料图片)
关键字是指在数据库中有意义的字,通常是数据库内部使用, 不能用于命名用户的数据对象。 有的数据库还会详细划分,例如分为关键字,候选字,甚至更详细的分类。分类的标准例如有的是绝对不可以使用,有的通过一定手段例如添加双引号可以使用。
我们为了方便统一称之为关键字,通常用户编写的对象中使用关键字会造成错误或不确定的影响,为了避免这个问题,用户应该避免使用数据库的关键字(含保留字或其他保留别名等)。
这个系列主要整理了各大数据库的关键字,可以用于建库,建表,写存储过程,函数等场景避免冲突。最后会有个脚本工具用来检查是否使用关键字。
9de7bb31d0644e7393039222babfed10
欢迎收藏。
Access
#访问保留的关键字
ADD FILLFACTOR 季度 全部 浮点 RAISERROR ALTER FOR 读取 AND FOREIGN READTEXT ANY FREETEXT RECONFIGURE AS FREETEXTTABLE 引用 ASC FROM 复制 AUTHORIZATION FULL RESTORE 备份 函数 RESTRICT BEGIN GOTO Return BETWEEN GRANT REVERT Break GROUP REVOKE 浏览 拥有 RIGHT BULK HOLDLOCK ROLLBACK BY 小时 ROWCOUNT CASCADE IDENTITY ROWGUIDCOL CASE IDENTITY_INSERT RULE CHECK IDENTITYCOL SAVE 检查点 IF SCHEMA CLOSE IN 秒 CLUSTERED INDEX SECURITYAUDIT COALESCE INNER SELECT COLLATE 插入 SEMANTICKEYPHRASETABLE COLUMN 整数 SEMANTICSIMILARITYDETAILSTABLE COMMIT INTERSECT SEMANTICSIMILARITYTABLE COMPUTE INTO SESSION_USER CONSTRAINT IS SET CONTAINS ISO_Week SETUSER CONTAINSTABLE 加入 ShortText CONTINUE KEY 关机 CONVERT KILL SOME 创建 LEFT 统计信息 CROSS LIKE SYSTEM_USER 货币 LINENO TABLE CURRENT LOAD TABLESAMPLE CURRENT_DATE LongText Text CURRENT_TIME MERGE TEXTSIZE CURRENT_TIMESTAMP 毫秒 THEN CURRENT_USER 分钟 时间 CURSOR 月 TO DATABASE NATIONAL 返回页首 Date 否 TRAN DateWithTime NOCHECK TRANSACTION Day NONCLUSTERED TRIGGER DayofYear NOT TRUNCATE DBCC NULL TRY_CONVERT DEALLOCATE NULLIF TSEQUAL DECLARE OF UNION DEFAULT OFF UNIQUE DELETE OFFSETS UNPIVOT 拒绝 ON 打开 更新 DESC OPEN UPDATETEXT DISK OPENDATASOURCE USE DISTINCT OPENQUERY USER DISTRIBUTED OPENROWSET VALUES DOUBLE OPENXML VARYING DROP OPTION VIEW DUMP 或 WAITFOR ELSE ORDER 周 结束 OUTER 工作日 ERRLVL OVER WHEN ESCAPE PERCENT WHERE EXCEPT PIVOT WHILE EXEC 计划 WITH EXECUTE PRECISION 在 GROUP 内 EXISTS PRIMARY WRITETEXT EXIT PRINT Year EXTERNAL PROC 是 FETCH PROCEDURE YesNo FILE PUBLIC
#ODBC 保留的关键字
ABSOLUTE EXEC OVERLAPS ACTION EXECUTE PAD ADA EXISTS PARTIAL ADD EXTERNAL PASCAL 全部 EXTRACT POSITION 分配 FALSE PRECISION ALTER FETCH PREPARE AND FIRST PRESERVE ANY FLOAT PRIMARY ARE FOR PRIOR AS FOREIGN PRIVILEGES ASC FORTRAN PROCEDURE ASSERTION 已找到 PUBLIC AT FROM 读取 AUTHORIZATION FULL REAL AVG GET 引用 BEGIN 全局 RELATIVE BETWEEN GO RESTRICT BIT GOTO REVOKE BIT_LENGTH GRANT RIGHT BOTH GROUP ROLLBACK BY 拥有 ROWS CASCADE HOUR SCHEMA CASCADED IDENTITY SCROLL CASE IMMEDIATE SECOND CAST IN SECTION CATALOG INCLUDE SELECT CHAR INDEX 会话 CHAR_LENGTH 指示器 SESSION_USER CHARACTER 最初 SET CHARACTER_LENGTH INNER SIZE CHECK INPUT SMALLINT CLOSE INSENSITIVE SOME COALESCE 插入 SPACE COLLATE INT SQL COLLATION INTEGER SQLCA COLUMN INTERSECT SQLCODE COMMIT INTERVAL SQLERROR CONNECT INTO SQLSTATE CONNECTION IS SQLWARNING CONSTRAINT ISOLATION SUBSTRING CONSTRAINTS 加入 SUM CONTINUE KEY SYSTEM_USER CONVERT LANGUAGE TABLE 对应 LAST TEMPORARY COUNT LEADING THEN 创建 LEFT TIME CROSS LEVEL TIMESTAMP CURRENT LIKE TIMEZONE_HOUR CURRENT_DATE LOCAL TIMEZONE_MINUTE CURRENT_TIME LOWER TO CURRENT_TIMESTAMP MATCH TRAILING CURRENT_USER MAX TRANSACTION CURSOR MIN TRANSLATE DATE MINUTE TRANSLATION DAY 模块 TRIM DEALLOCATE MONTH TRUE DEC 名称 UNION DECIMAL NATIONAL UNIQUE DECLARE NATURAL UNKNOWN DEFAULT NCHAR 更新 DEFERRABLE NEXT UPPER DEFERRED 不 USAGE DELETE NONE USER DESC NOT USING 描述 NULL VALUE 描述符 NULLIF VALUES 诊断 NUMERIC VARCHAR DISCONNECT OCTET_LENGTH VARYING DISTINCT OF VIEW DOMAIN ON 打开 WHEN DOUBLE ONLY WHENEVER DROP OPEN WHERE ELSE OPTION WITH 结束 或 WORK END-EXEC ORDER WRITE ESCAPE OUTER YEAR EXCEPT OUTPUT ZONE 异常
#未来关键字
ABSOLUTE HOST RELATIVE ACTION HOUR RELEASE ADMIN IGNORE RESULT AFTER IMMEDIATE 返回 AGGREGATE 指示器 ROLE ALIAS INITIALIZE ROLLUP 分配 最初 例程 ARE INOUT ROW ARRAY INPUT ROWS ASENSITIVE INT SAVEPOINT ASSERTION INTEGER SCROLL 非对称 INTERSECTION SCOPE AT INTERVAL SEARCH ATOMIC ISOLATION SECOND BEFORE ITERATE SECTION BINARY LANGUAGE 敏感 BIT LARGE SEQUENCE BLOB LAST 会话 BOOLEAN 横向 SETS BOTH LEADING 相似 BREADTH LESS SIZE CALL LEVEL SMALLINT 已调用 LIKE_REGEX SPACE 基数 LIMIT SPECIFIC CASCADED LN SPECIFICTYPE CAST LOCAL SQL CATALOG LOCALTIME SQLEXCEPTION CHAR LOCALTIMESTAMP SQLSTATE CHARACTER 定位器 SQLWARNING CLASS MAP START 一些 MATCH STATE COLLATION MEMBER 语句 COLLECT 方法 STATIC 完成 MINUTE STDDEV_POP CONDITION MOD STDDEV_SAMP CONNECT MODIFIES 结构 CONNECTION MODIFY SUBMULTISET CONSTRAINTS 模块 SUBSTRING_REGEX 构造函数 MONTH SYMMETRIC CORR MULTISET SYSTEM 对应 名称 TEMPORARY COVAR_POP NATURAL TERMINATE COVAR_SAMP NCHAR THAN CUBE NCLOB TIME CUME_DIST 新增功能 TIMESTAMP CURRENT_CATALOG NEXT TIMEZONE_HOUR CURRENT_DEFAULT_TRANSFORM_GROUP 不 TIMEZONE_MINUTE CURRENT_PATH NONE TRAILING CURRENT_ROLE NORMALIZE TRANSLATE_REGEX CURRENT_SCHEMA NUMERIC TRANSLATION CURRENT_TRANSFORM_GROUP_FOR_TYPE OBJECT TREAT CYCLE OCCURRENCES_REGEX TRUE DATA OLD UESCAPE DATE ONLY UNDER DAY OPERATION UNKNOWN DEC ORDINALITY UNNEST DECIMAL OUT USAGE DEFERRABLE OVERLAY USING DEFERRED OUTPUT VALUE DEPTH PAD VAR_POP DEREF PARAMETER VAR_SAMP 描述 参数 VARCHAR 描述符 PARTIAL 变量 销毁 PARTITION WHENEVER DESTRUCTOR 路径 WIDTH_BUCKET 确定 POSTFIX 无 DICTIONARY PREFIX WINDOW 诊断 PREORDER WITHIN DISCONNECT PREPARE WORK DOMAIN PERCENT_RANK WRITE 动态 PERCENTILE_CONT XMLAGG 每个 PERCENTILE_DISC XMLATTRIBUTES 元素 POSITION_REGEX XMLBINARY END-EXEC PRESERVE XMLCAST EQUALS PRIOR XMLCOMMENT EVERY PRIVILEGES XMLCONCAT 异常 RANGE XMLDOCUMENT FALSE 读取 XMLELEMENT FILTER REAL XMLEXISTS FIRST RECURSIVE XMLFOREST FLOAT REF XMLITERATE 已找到 引用 XMLNAMESPACES 免费 REGR_AVGX XMLPARSE FULLTEXTTABLE REGR_AVGY XMLPI FUSION REGR_COUNT XMLQUERY 常规 REGR_INTERCEPT XMLSERIALIZE GET REGR_R2 XMLTABLE 全局 REGR_SLOPE XMLTEXT GO REGR_SXX XMLVALIDATE 分组 REGR_SXY YEAR HOLD REGR_SYY ZONE
关键词: