sql server关键字大全
Microsoft® SQL Server™ 2000 使用保留关键字定义、操作和访问数据库。保留关键字是 SQL Server 使用的 Transact-SQL 语言语法的一部分,用于分析和理解 Transact-SQL 语句和批处理。尽管在 Transact-SQL 脚本中,使用 SQL Server 保留关键字作为标识符和对象名在语法上是可行的,但规定只能使用分隔标识符。
下表列出了 SQL Server 的保留关键字。
ADD | EXCEPT | PERCENT |
ALL | EXEC | PLAN |
ALTER | EXECUTE | PRECISION |
AND | EXISTS | PRIMARY |
ANY | EXIT | |
AS | FETCH | PROC |
ASC | FILE | PROCEDURE |
AUTHORIZATION | FILLFACTOR | PUBLIC |
BACKUP | FOR | RAISERROR |
BEGIN | FOREIGN | READ |
BETWEEN | FREETEXT | READTEXT |
BREAK | FREETEXTTABLE | RECONFIGURE |
BROWSE | FROM | REFERENCES |
BULK | FULL | REPLICATION |
BY | FUNCTION | RESTORE |
CASCADE | GOTO | RESTRICT |
CASE | GRANT | RETURN |
CHECK | GROUP | REVOKE |
CHECKPOINT | HAVING | RIGHT |
CLOSE | HOLDLOCK | ROLLBACK |
CLUSTERED | IDENTITY | ROWCOUNT |
COALESCE | IDENTITY_INSERT | ROWGUIDCOL |
COLLATE | IDENTITYCOL | RULE |
COLUMN | IF | SAVE |
COMMIT | IN | SCHEMA |
COMPUTE | INDEX | SELECT |
CONSTRAINT | INNER | SESSION_USER |
CONTAINS | INSERT | SET |
CONTAINSTABLE | INTERSECT | SETUSER |
CONTINUE | INTO | SHUTDOWN |
CONVERT | IS | SOME |
CREATE | JOIN | STATISTICS |
CROSS | KEY | SYSTEM_USER |
CURRENT | KILL | TABLE |
CURRENT_DATE | LEFT | TEXTSIZE |
CURRENT_TIME | LIKE | THEN |
CURRENT_TIMESTAMP | LINENO | TO |
CURRENT_USER | LOAD | TOP |
CURSOR | NATIONAL | TRAN |
DATABASE | NOCHECK | TRANSACTION |
DBCC | NONCLUSTERED | TRIGGER |
DEALLOCATE | NOT | TRUNCATE |
DECLARE | NULL | TSEQUAL |
DEFAULT | NULLIF | UNION |
DELETE | OF | UNIQUE |
DENY | OFF | UPDATE |
DESC | OFFSETS | UPDATETEXT |
DISK | ON | USE |
DISTINCT | OPEN | USER |
DISTRIBUTED | OPENDATASOURCE | VALUES |
DOUBLE | OPENQUERY | VARYING |
DROP | OPENROWSET | VIEW |
DUMMY | OPENXML | WAITFOR |
DUMP | OPTION | WHEN |
ELSE | OR | WHERE |
END | ORDER | WHILE |
ERRLVL | OUTER | WITH |
ESCAPE | OVER | WRITETEXT |
另外,SQL-92 标准还定义了保留关键字列表。不要使用 SQL-92 保留关键字作为对象名和标识符。ODBC 保留关键字列表(如下所示)与 SQL-92 保留关键字列表相同。
说明 SQL-92 保留关键字列表有时可能比 SQL Server 限制更多,有时则限制更少。例如,SQL-92 保留关键字列表包含 INT,而 SQL Server 不需要将其区分为保留关键字。
Transact-SQL 保留关键字可用作数据库或数据库对象(如表、列、视图等)的标识符或名称。使用被引用的标识符或分隔标识符。对将保留关键字用作变量和存储过程参数的名称没有限制。有关更多信息,请参见使用标识符。
ODBC 保留关键字
保留了下列关键字用于 ODBC 函数调用。这些关键字根本不约束 SQL 语法;然而,为确保与支持核心 SQL 语法的驱动程序兼容,应用程序应避免使用这些关键字。
下面是当前的 ODBC 保留关键字列表。有关更多信息,请参见《MicrosoftODBC 3.0 程序员参考》,第 2 卷,附录 C。
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 | FOUND | PRESERVE |
ACTION | FREE | PRIOR |
ADMIN | GENERAL | PRIVILEGES |
AFTER | GET | READS |
AGGREGATE | GLOBAL | REAL |
ALIAS | GO | RECURSIVE |
ALLOCATE | GROUPING | REF |
ARE | HOST | REFERENCING |
ARRAY | HOUR | RELATIVE |
ASSERTION | IGNORE | RESULT |
AT | IMMEDIATE | RETURNS |
BEFORE | INDICATOR | ROLE |
BINARY | INITIALIZE | ROLLUP |
BIT | INITIALLY | ROUTINE |
BLOB | INOUT | ROW |
BOOLEAN | INPUT | ROWS |
BOTH | INT | SAVEPOINT |
BREADTH | INTEGER | SCROLL |
CALL | INTERVAL | SCOPE |
CASCADED | ISOLATION | SEARCH |
CAST | ITERATE | SECOND |
CATALOG | LANGUAGE | SECTION |
CHAR | LARGE | SEQUENCE |
CHARACTER | LAST | SESSION |
CLASS | LATERAL | SETS |
CLOB | LEADING | SIZE |
COLLATION | LESS | SMALLINT |
COMPLETION | LEVEL | SPACE |
CONNECT | LIMIT | SPECIFIC |
CONNECTION | LOCAL | SPECIFICTYPE |
CONSTRAINTS | LOCALTIME | SQL |
CONSTRUCTOR | LOCALTIMESTAMP | SQLEXCEPTION |
CORRESPONDING | LOCATOR | SQLSTATE |
CUBE | MAP | SQLWARNING |
CURRENT_PATH | MATCH | START |
CURRENT_ROLE | MINUTE | STATE |
CYCLE | MODIFIES | STATEMENT |
DATA | MODIFY | STATIC |
DATE | MODULE | STRUCTURE |
DAY | MONTH | TEMPORARY |
DEC | NAMES | TERMINATE |
DECIMAL | NATURAL | THAN |
DEFERRABLE | NCHAR | TIME |
DEFERRED | NCLOB | TIMESTAMP |
DEPTH | NEW | TIMEZONE_HOUR |
DEREF | NEXT | TIMEZONE_MINUTE |
DESCRIBE | NO | TRAILING |
DESCRIPTOR | NONE | TRANSLATION |
DESTROY | NUMERIC | TREAT |
DESTRUCTOR | OBJECT | TRUE |
DETERMINISTIC | OLD | UNDER |
DICTIONARY | ONLY | UNKNOWN |
DIAGNOSTICS | OPERATION | UNNEST |
DISCONNECT | ORDINALITY | USAGE |
DOMAIN | OUT | USING |
DYNAMIC | OUTPUT | VALUE |
EACH | PAD | VARCHAR |
END-EXEC | PARAMETER | VARIABLE |
EQUALS | PARAMETERS | WHENEVER |
EVERY | PARTIAL | WITHOUT |
EXCEPTION | PATH | WORK |
EXTERNAL | POSTFIX | WRITE |
FLASE | PREFIX | YEAR |
FIRST | PREORDER | ZONE |
FLOAT | PREPARE |
sql server关键字大全的更多相关文章
- SQL SERVER 函数大全[转]
SQL Server 函数大全 一旦成功地从表中检索出数据,就需要进一步操纵这些数据,以获得有用或有意义的结果.这些要求包括:执行计算与数学运算.转换数据.解析数值.组合值和聚合一个范围内的值等. 下 ...
- 【转载】SQL SERVER 函数大全
SQL Server 函数大全 一旦成功地从表中检索出数据,就需要进一步操纵这些数据,以获得有用或有意义的结果.这些要求包括:执行计算与数学运算.转换数据.解析数值.组合值和聚合一个范围内的值等. 下 ...
- SQL SERVER 语句大全
·SQL的简单查询实例教程关键词:SQL语句大全 中文网 整理编辑,经典SQL语句大全(SQL语句大总结),欢迎网友投稿 下列语句部分是Mssql语句,不可以在access中使用.SQL分类:DDL— ...
- SQL server函数大全
函数类别 作用 聚合函数 执行的操作是将多个值合并为一个值.例如 COUNT.SUM.MIN 和MAX. 配置函数 是一种标量函数,可返回有关配置设置的信息. 转换函数 将值从一种数据类型转换为另一种 ...
- Sql Server语句大全
T-SQL语句大全 --跳转到SQL myDemo USE [SQL myDemo] go --声明变量id declare @id int --为变量赋值:直接赋值 --将cid为3的cname值赋 ...
- SQL Server 函数大全
本文链接:https://blog.csdn.net/qq_15028299/article/details/81330854SQL2008 表达式:是常量.变量.列或函数等与运算符的任意组合.htt ...
- SQL Server 语法大全
SQL语句参考,包含Access.MySQL 以及 SQL Server 基础 创建数据库 CREATE DATABASE database-name 删除数据库 drop database dbna ...
- 经典实用SQL Server语句大全总结(一)
简要介绍基础语句:1.说明:创建数据库CREATE DATABASE database-name2.说明:删除数据库drop database dbname3.说明:备份sql server--- 创 ...
- 下载-MS SQL Server 2005(大全版)含开发人员版、企业版、标准版【转】
中文名称:微软SQL Server 2005 英文名称:MS SQL Server 2005资源类型:ISO版本:开发人员版.企业版.标准版发行时间:2006年制作发行:微软公司地区:大陆语言:普通话 ...
随机推荐
- Communication between C++ and Javascript in Qt WebEngine(转载)
Communication between C++ and Javascript in Qt WebEngine admin January 31, 2018 0 As Qt WebKit is re ...
- Linux中环境变量文件profile、bashrc、bash_profile之间的区别和联系
/etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行.并从/etc/profile.d目录的配置文件中搜集shell的设置. 英文描述为: # /etc/pr ...
- 2019.10.9php进阶
<?php header("Content-type:text/html;charset:utf-8"); if ($_FILES["file"][&qu ...
- CentOS7 配置NFS(Network File System)及其使用
1. 服务端配置 1.1. 安装NFS yum -y install nfs* 1.2. 查看是否安装了NFS与RPCBIND rpm -qa | grep nfs rpm - ...
- antd design vue 设置 v-decorator 的初始值
v-decorator="['openType', { initialValue:'1' }]" 效果:
- mysql绿色版的应用
一.首先下载mysql 1.进入 https://www.oracle.com/index.html 网址 2.拉倒页面的最下面 3. 4.把下好的压缩文件解压出来 二.在DOS命令里面配置 1.先进 ...
- tp6中使用微信支付sdk
一.下载微信支付sdk 二.将lib文件夹下的文件复制到目录:extend->WxPay 将example文件夹下的WxPay.Config.php文件也复制到:extend->WxPay ...
- Python3数据结构汇总
字符 列表 元组 集合 字典 能否被索引或切片 能 能 能 否 否 元素能否被编辑 否 能 否 能 能 增 1.list.append(x):把一个元素添加到列表的结尾: 2.list.insert( ...
- [人物存档]【AI少女】【捏脸数据】气质学生
点击下载(城通网盘): AISChaF_20191119010459547.png
- js 动态加载js 并执行
function loadJS(url, success) { var domScript = document.createElement('script'); domScript.src = ur ...