保留关键字 (Transact-SQL)
下表列出了 SQL Server 保留关键字。
add |
EXTERNAL |
PROCEDURE |
ALL |
FETCH |
PUBLIC |
ALTER |
FILE |
RAISERROR |
And |
FILLFACTOR |
READ |
ANY |
FOR |
READTEXT |
As |
FOREIGN |
RECONFIGURE |
ASC |
FREETEXT |
REFERENCES |
AUTHORIZATION |
FREETEXTTABLE |
REPLICATION |
BACKUP |
from |
RESTORE |
BEGIN |
FULL |
RESTRICT |
BETWEEN |
FUNCTION |
RETURN |
BREAK |
GOTO |
REVERT |
BROWSE |
GRANT |
REVOKE |
BULK |
GROUP |
RIGHT |
BY |
HAVING |
ROLLBACK |
CASCADE |
HOLDLOCK |
ROWCOUNT |
Case |
IDENTITY |
ROWGUIDCOL |
CHECK |
IDENTITY_INSERT |
RULE |
CHECKPOINT |
IDENTITYCOL |
SAVE |
close |
IF |
SCHEMA |
CLUSTERED |
IN |
SECURITYAUDIT |
COALESCE |
INDEX |
SELECT |
COLLATE |
INNER |
SEMANTICKEYPHRASETABLE |
COLUMN |
INSERT |
SEMANTICSIMILARITYDETAILSTABLE |
COMMIT |
INTERSECT |
SEMANTICSIMILARITYTABLE |
COMPUTE |
INTO |
SESSION_USER |
CONSTRAINT |
is |
SET |
CONTAINS |
JOIN |
SETUSER |
CONTAINSTABLE |
KEY |
SHUTDOWN |
CONTINUE |
KILL |
SOME |
CONVERT |
LEFT |
STATISTICS |
CREATE |
LIKE |
SYSTEM_USER |
CROSS |
LINENO |
TABLE |
CURRENT |
LOAD |
TABLESAMPLE |
CURRENT_DATE |
MERGE |
TEXTSIZE |
CURRENT_TIME |
NATIONAL |
THEN |
CURRENT_TIMESTAMP |
NOCHECK |
目标 |
CURRENT_USER |
NONCLUSTERED |
TOP |
CURSOR |
NOT |
TRAN |
DATABASE |
NULL |
TRANSACTION |
DBCC |
NULLIF |
Trigger |
DEALLOCATE |
OF |
TRUNCATE |
DECLARE |
OFF |
TRY_CONVERT |
DEFAULT |
OFFSETS |
TSEQUAL |
delete |
ON |
UNION |
DENY |
OPEN |
UNIQUE |
DESC |
OPENDATASOURCE |
UNPIVOT |
DISK |
OPENQUERY |
UPDATE |
DISTINCT |
OPENROWSET |
UPDATETEXT |
DISTRIBUTED |
OPENXML |
USE |
DOUBLE |
OPTION |
USER |
DROP |
OR |
VALUES |
DUMP |
ORDER |
VARYING |
Else |
OUTER |
View |
END |
OVER |
WAITFOR |
ERRLVL |
PERCENT |
WHEN |
ESCAPE |
PIVOT |
WHERE |
EXCEPT |
PLAN |
WHILE |
EXEC |
PRECISION |
WITH |
EXECUTE |
PRIMARY |
WITHIN GROUP |
EXISTS |
|
WRITETEXT |
EXIT |
PROC |
此外,ISO 标准定义了保留关键字列表。 不要使用 ISO 保留关键字作为对象名和标识符。 ODBC 保留关键字列表(如下表所示)与 ISO 保留关键字列表相同。
注意 |
---|
ISO 标准保留关键字有时可能比 SQL Server 限制更多,有时则更少。 例如,ISO 保留关键字列表包含 INT。 SQL Server 不必将此区分为保留关键字。 |
Transact-SQL 保留关键字可用作数据库或数据库对象(如表、列、视图等)的标识符或名称。 使用带引号的标识符或分隔标识符。 不限制将保留关键字用作变量和存储过程参数的名称。
保留了下列关键字以用于 ODBC 函数调用。 这些关键字根本不约束 SQL 语法;然而,为确保与支持核心 SQL 语法的驱动程序兼容,应用程序应避免使用这些关键字。
下面是当前的 ODBC 保留关键字列表。
ABSOLUTE |
EXEC |
OVERLAPS |
ACTION |
EXECUTE |
PAD |
ADA |
EXISTS |
PARTIAL |
ADD |
EXTERNAL |
PASCAL |
ALL |
EXTRACT |
POSITION |
ALLOCATE |
FALSE |
PRECISION |
ALTER |
FETCH |
PREPARE |
AND |
FIRST |
PRESERVE |
ANY |
FLOAT |
PRIMARY |
ARE |
FOR |
PRIOR |
AS |
FOREIGN |
PRIVILEGES |
ASC |
FORTRAN |
PROCEDURE |
ASSERTION |
FOUND |
PUBLIC |
AT |
FROM |
READ |
AUTHORIZATION |
FULL |
REAL |
AVG |
GET |
REFERENCES |
BEGIN |
GLOBAL |
RELATIVE |
BETWEEN |
GO |
RESTRICT |
BIT |
GOTO |
REVOKE |
BIT_LENGTH |
GRANT |
RIGHT |
BOTH |
GROUP |
ROLLBACK |
BY |
HAVING |
ROWS |
CASCADE |
HOUR |
SCHEMA |
CASCADED |
IDENTITY |
SCROLL |
CASE |
IMMEDIATE |
SECOND |
CAST |
IN |
SECTION |
CATALOG |
INCLUDE |
SELECT |
CHAR |
INDEX |
SESSION |
CHAR_LENGTH |
INDICATOR |
SESSION_USER |
CHARACTER |
INITIALLY |
SET |
CHARACTER_LENGTH |
INNER |
SIZE |
CHECK |
INPUT |
SMALLINT |
CLOSE |
INSENSITIVE |
SOME |
COALESCE |
INSERT |
SPACE |
COLLATE |
INT |
SQL |
COLLATION |
INTEGER |
SQLCA |
COLUMN |
INTERSECT |
SQLCODE |
COMMIT |
INTERVAL |
SQLERROR |
CONNECT |
INTO |
SQLSTATE |
CONNECTION |
IS |
SQLWARNING |
CONSTRAINT |
ISOLATION |
SUBSTRING |
CONSTRAINTS |
JOIN |
SUM |
CONTINUE |
KEY |
SYSTEM_USER |
CONVERT |
LANGUAGE |
TABLE |
CORRESPONDING |
LAST |
TEMPORARY |
COUNT |
LEADING |
THEN |
CREATE |
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 |
MODULE |
TRIM |
DEALLOCATE |
MONTH |
TRUE |
DEC |
NAMES |
UNION |
DECIMAL |
NATIONAL |
UNIQUE |
DECLARE |
NATURAL |
UNKNOWN |
DEFAULT |
NCHAR |
UPDATE |
DEFERRABLE |
NEXT |
UPPER |
DEFERRED |
NO |
USAGE |
DELETE |
NONE |
USER |
DESC |
NOT |
USING |
DESCRIBE |
NULL |
VALUE |
DESCRIPTOR |
NULLIF |
VALUES |
DIAGNOSTICS |
NUMERIC |
VARCHAR |
DISCONNECT |
OCTET_LENGTH |
VARYING |
DISTINCT |
OF |
VIEW |
DOMAIN |
ON |
WHEN |
DOUBLE |
ONLY |
WHENEVER |
DROP |
OPEN |
WHERE |
ELSE |
OPTION |
WITH |
END |
OR |
WORK |
END-EXEC |
ORDER |
WRITE |
ESCAPE |
OUTER |
YEAR |
EXCEPT |
OUTPUT |
ZONE |
EXCEPTION |
下列关键字可能会在将来的 SQL Server 版本中保留使用,作为将来要实现的新功能。 注意,不要使用这些关键字作为标识符。
ABSOLUTE |
HOST |
RELATIVE |
ACTION |
HOUR |
RELEASE |
ADMIN |
IGNORE |
RESULT |
AFTER |
IMMEDIATE |
RETURNS |
AGGREGATE |
INDICATOR |
ROLE |
Alias |
INITIALIZE |
ROLLUP |
ALLOCATE |
INITIALLY |
ROUTINE |
ARE |
INOUT |
ROW |
ARRAY |
INPUT |
ROWS |
ASENSITIVE |
INT |
SAVEPOINT |
ASSERTION |
INTEGER |
SCROLL |
ASYMMETRIC |
INTERSECTION |
SCOPE |
AT |
INTERVAL |
SEARCH |
ATOMIC |
ISOLATION |
SECOND |
BEFORE |
ITERATE |
SECTION |
BINARY |
LANGUAGE |
SENSITIVE |
BIT |
LARGE |
SEQUENCE |
BLOB |
LAST |
SESSION |
BOOLEAN |
LATERAL |
SETS |
BOTH |
LEADING |
SIMILAR |
BREADTH |
LESS |
SIZE |
CALL |
LEVEL |
SMALLINT |
CALLED |
LIKE_REGEX |
SPACE |
CARDINALITY |
LIMIT |
SPECIFIC |
CASCADED |
LN |
SPECIFICTYPE |
CAST |
LOCAL |
SQL |
CATALOG |
LOCALTIME |
SQLEXCEPTION |
CHAR |
LOCALTIMESTAMP |
SQLSTATE |
CHARACTER |
LOCATOR |
SQLWARNING |
CLASS |
MAP |
START |
CLOB |
MATCH |
状态 |
COLLATION |
MEMBER |
STATEMENT |
COLLECT |
METHOD |
STATIC |
COMPLETION |
MINUTE |
STDDEV_POP |
CONDITION |
MOD |
STDDEV_SAMP |
CONNECT |
MODIFIES |
STRUCTURE |
CONNECTION |
MODIFY |
SUBMULTISET |
CONSTRAINTS |
MODULE |
SUBSTRING_REGEX |
CONSTRUCTOR |
MONTH |
SYMMETRIC |
CORR |
MULTISET |
SYSTEM |
CORRESPONDING |
NAMES |
TEMPORARY |
COVAR_POP |
NATURAL |
TERMINATE |
COVAR_SAMP |
NCHAR |
THAN |
CUBE |
NCLOB |
TIME |
CUME_DIST |
NEW |
TIMESTAMP |
CURRENT_CATALOG |
NEXT |
TIMEZONE_HOUR |
CURRENT_DEFAULT_TRANSFORM_GROUP |
NO |
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 |
参数 |
VAR_SAMP |
DESCRIBE |
PARAMETERS |
VARCHAR |
DESCRIPTOR |
PARTIAL |
VARIABLE |
DESTROY |
PARTITION |
WHENEVER |
DESTRUCTOR |
PATH |
WIDTH_BUCKET |
DETERMINISTIC |
POSTFIX |
WITHOUT |
DICTIONARY |
PREFIX |
WINDOW |
DIAGNOSTICS |
PREORDER |
WITHIN |
DISCONNECT |
PREPARE |
WORK |
DOMAIN |
PERCENT_RANK |
WRITE |
DYNAMIC |
PERCENTILE_CONT |
XMLAGG |
EACH |
PERCENTILE_DISC |
XMLATTRIBUTES |
ELEMENT |
POSITION_REGEX |
XMLBINARY |
END-EXEC |
PRESERVE |
XMLCAST |
EQUALS |
PRIOR |
XMLCOMMENT |
EVERY |
PRIVILEGES |
XMLCONCAT |
EXCEPTION |
RANGE |
XMLDOCUMENT |
FALSE |
READS |
XMLELEMENT |
FILTER |
REAL |
XMLEXISTS |
FIRST |
RECURSIVE |
XMLFOREST |
FLOAT |
REF |
XMLITERATE |
FOUND |
REFERENCING |
XMLNAMESPACES |
FREE |
REGR_AVGX |
XMLPARSE |
FULLTEXTTABLE |
REGR_AVGY |
XMLPI |
FUSION |
REGR_COUNT |
XMLQUERY |
GENERAL |
REGR_INTERCEPT |
XMLSERIALIZE |
GET |
REGR_R2 |
XMLTABLE |
GLOBAL |
REGR_SLOPE |
XMLTEXT |
GO |
REGR_SXX |
XMLVALIDATE |
GROUPING |
REGR_SXY |
YEAR |
HOLD |
REGR_SYY |
ZONE |
保留关键字 (Transact-SQL)的更多相关文章
- SQL Server 保留关键字
Microsoft SQL Server 2005 使用保留关键字来定义.操作或访问数据库.保留关键字是 SQL Server 使用的 Transact-SQL 语言语法的一部分,用于分析和理解 Tr ...
- SQL保留关键字不能用作表名
com.microsoft.sqlserver.jdbc.SQLServerException: 关键字 'User' 附近有语法错误. 一看就是SQL语句错误,发现控制台console上打印出来的S ...
- ora-01445:无法从不带保留关键字的表的连接视图中选择ROWID或采样
系统要创建一个物化试图,用到很多张表,执行的时候报错: ora-01445:无法从不带保留关键字的表的连接视图中选择ROWID或采样 网上搜了下,有多种原因和解决方法,最终我选择先尝试一下修改 ...
- ora-01445 无法从不带保留关键字的表的联接视图中选择 ROWID 或采样
ora-01445无法从不带保留关键字的表的联接视图中选择 ROWID 或采样 从网上找了很多资料,许多都是没结贴的,说什么的都有,排查了一下sql 发现各个段的left join都没有错误. 有一个 ...
- MySQL保留关键字
今天在使用hibernate关联映射导出表的时候因为映射了一个表名为option,是MYSQL的关键字,总是生成错误,一开始以为是映射文件和代码问题,检查不出问题才想到可能用到数据库的保留关键字了,查 ...
- MySQL的保留关键字,使用时尽量避免
今天用phpmyadmin时,注意到一个提示: 列名 'update' 是一个MySQL 保留关键字. 突然意识到还是应该尽量避免这些保留关键字,也百度了一下.找到了这些关键字,列出来下 使用mysq ...
- access的保留关键字
access的保留关键字 -A ADD ALL Alphanumeric ALTER AND ANY Application AS ...
- MySQL5.7 关键字和保留关键字
来源:https://dev.mysql.com/doc/refman/5.7/en/keywords.html 标有(R)的为保留关键字. A ACCESSIBLE (R) ACCOUNT; add ...
- javascript保留关键字
1.通用保留关键字 break delete function return typeof case do if switch var catch else in this void continue ...
随机推荐
- Android从零单排之免费短信验证
介绍 短信验证功能大家都很熟悉了.在很多地方都能见到,注册新用户或者短息验证支付等.短信验证利用短信验证码来注册会员,大大降低了非法注册,很大程度上提高了用户账户的安全性. 目前市面上已经有了很多提供 ...
- RESTLET开发实例(三)基于spring的REST服务
http://www.lifeba.org/arch/restlet_spring_3.html 前面两篇文章,我们介绍了基于JAX-RS的REST服务以及Application的Rest服务.这里将 ...
- oracle执行.sql文件
->win+R; ->CMD; ->SQLPLUS /NOLOG; ->CONNECT USER/PASSWORD@ORCL; ->@D:/XXX.SQL;
- [codevs]失恋28天题目系列
失恋28天-追女孩篇 题目描述 Description 呵呵,相信大家失恋33天都看过吧,里面的主人公黄小仙和王小贱都有印象吧!这回我要给大家讲的是我 们班同学的失恋经历,呵呵他总共失恋了28天.但是 ...
- 2015年9月28日JQuery提前预习预热笔记
visual studio下载2010 2010与2008不一样,2008需要添加补丁,采用调用对象.2010可以直接用. JQuery=$ 是函数是方法是对象 念J快儿,念doler 开发人员工具( ...
- Extjs 4.x 得到form CheckBox的值
CheckBox(复选框)主要用来接收用户选择的选项 如图所示(请忽略UI的不好看): 该弹出窗口的主要代码如下: var win = new Ext.Window({ modal : true, t ...
- BZOJ1997 [Hnoi2010]Planar (2-sat)
题意:给你一个哈密顿图,判断是不是平面图 思路:先找出哈密顿图来.哈密顿回路可以看成一个环,把边集划分成两个集合,一个在环内,一个在外.如果有两条相交边在环内,则一定不是平面图,所以默认两条相交边,转 ...
- Linux 下的五种 IO 模型
概念说明 用户空间与内核空间 现在操作系统都是采用虚拟存储器,那么对32位操作系统而言,它的寻址空间(虚拟存储空间)为4G(2的32次方).操作系统的核心是内核,独立于普通的应用程序,可以访问受保护的 ...
- pm 2.5
定陵</a></div><div class="staaqi"><span class="label pmsmall" ...
- 学习微信小程序之css13关于盒子外边距的合并