当前位置:七道奇文章资讯数据防范MSSQL防范
日期:2011-05-02 15:21:00  来源:本站整理

SQLServer的保存关键字一览[MSSQL防范]

赞助商链接



  本文“SQLServer的保存关键字一览[MSSQL防范]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:

sql server 保存关键字

Microsoft® SQL Server™ 2000 利用保存关键字定义、操作和拜候数据库.保存关键字是 SQL Server 利用的 Transact-SQL 语言语法的一部份,用于解析和理解 Transact-SQL 语句和批处理.固然在 Transact-SQL 脚本中,利用 SQL Server 保存关键字作为标识符和对象名在语法上是可行的,但规定只能利用脱离标识符.China It Power . Com9meWH

下表列出了 SQL Server 的保存关键字.China It Power . Com9meWH

ADD EXCEPT PERCENT
ALL EXEC PLAN
ALTER EXECUTE PRECISION
AND EXISTS PRIMARY
ANY EXIT PRINT
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 保存关键字列表相同.China It Power . Com9meWH

阐明  SQL-92 保存关键字列表有时大概比 SQL Server 限制更多,有时则限制更少.比方,SQL-92 保存关键字列表包含 INT,而 SQL Server 不需求将其辨别为保存关键字.China It Power . Com9meWH

China It Power . Com9meWH

Transact-SQL 保存关键字可用作数据库或数据库对象(如表、列、视图等)的标识符或名称.利用被引用的标识符或脱离标识符.对将保存关键字用作变量和存储历程参数的名称没有限制.China It Power . Com9meWH

ODBC 保存关键字

保存了下列关键字用于 ODBC 函数调用.这些关键字根本不约束 SQL 语法;但是,为确保与支持核心 SQL 语法的驱动程序兼容,利用程序应避免利用这些关键字.China It Power . Com9meWH

下面是当前的 ODBC 保存关键字列表.有关更多信息,请拜见《Microsoft ODBC 3.0 程序员参考》,第 2 卷,附录 C.China It Power . Com9meWH

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 版本中,作为将来要实现的新特点.注意,不要利用这些关键字作为标识符.China It Power . Com9meWH

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  

  以上是“SQLServer的保存关键字一览[MSSQL防范]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
  • sqlserver索引的原理及索引成立的注意事项小结
  • sqlserver数据库主键的生成方法小结(sqlserver,mysql)
  • sqlserver主键计划的注意点
  • CREATE FUNCTION sqlserver用户定义函数
  • 利用cmd号令行窗口操作SqlServer的办法
  • sqlserver bcp(数据导入导出工具)普通用法与号令详解
  • 重命名SQLServer数据库的办法
  • 利用SqlBulkCopy时应注意Sqlserver表中利用缺省值的列
  • sqlserver中将varchar范例转换为int型再举行排序的办法
  • sqlserver 改正列名及表名的sql语句
  • SQLServer顶用T—SQL号令查询一个数据库中有哪些表的sql语句
  • sqlserver 脚本和批处理指令小结
  • 本文地址: 与您的QQ/BBS好友分享!
    • 好的评价 如果您觉得此文章好,就请您
        0%(0)
    • 差的评价 如果您觉得此文章差,就请您
        0%(0)

    文章评论评论内容只代表网友观点,与本站立场无关!

       评论摘要(共 0 条,得分 0 分,平均 0 分) 查看完整评论
    Copyright © 2020-2022 www.xiamiku.com. All Rights Reserved .