附录E SQL入门之SQL保留字

2023-12-26 09:52:22

文章目录


SQL是由关键字组成的语言,关键字是一些用于执行SQL操作的特殊词汇。在命名数据库、表、列和其他数据库对象时,一定不要使用这些关键字。因此,这些关键字是一定要保留的。
本附录列出主要DBMS中最常用的保留字。请注意以下几点。

  • 关键字随不同的DBMS而变化,并非下面的所有关键字都被所有DBMS采用。
  • 许多DBMS扩展了SQL保留字,使其包含专门用于实现的术语。多数DBMS专用的关键字未列在下面。
  • 为保证以后的兼容性和可移植性,应避免使用这些保留字,即使它们不是你使用的DBMS的保留字。
ABORT                            ABSOLUTE                            ACTION
ACTIVE                           ADD                                 AFTER
ALL                              ALLOCATE                            ALTER
ANALYZE                          AND                                 ANY
ARE                              AS                                  ASC
ASCENDING                        ASSERTION                           AT
AUTHORIZATION                    AUTO                                AUTO-INCREMENT
AUTOINC                          AVG                                 BACKUP
BEFORE                           BEGIN                               BETWEEN
BIGINT                           BINARY                              BIT
BLOB                             BOOLEAN                             BOTH
BREAK                            BROWSE                              BULK
BY                               BYTES                               CACHE
CALL                             CASCADE                             CASCADED
CASE                             CAST                                CATALOG
CHANGE                           CHAR                                CHARACTER
CHARACTER_LENGTH                 CHECK                               CHECKPOINT
CLOSE                            CLUSTER                             CLUSTERED
COALESCE                         COLLATE                             COLUMN
COLUMNS                          COMMENT                             COMMIT
COMMITTED                        COMPUTE                             COMPUTED
CONDITIONAL                      CONFIRM                             CONNECT
CONNECTION                       CONSTRAINT                          CONSTRAINTS
CONTAINING                       CONTAINS                            CONTAINSTABLE
CONTINUE                         CONTROLROW                          CONVERT
COPY                             COUNT                               CREATE
CROSS                            CSTRING                             CUBE
CURRENT                          CURRENT_DATE                        CURRENT_TIME
CURRENT_TIMESTAMP                CURRENT_USER                        CURSOR
DATABASE                         DATABASES                           DATE
DATETIME                         DAY                                 DBCC
DEALLOCATE                       DEBUG                               DEC
DECIMAL                          DECLARE                             DEFAULT
DELETE                           DENY                                DESC
DESCENDING                       DESCRIBE                            DISCONNECT
DISK                             DISTINCT                            DISTRIBUTED
DIV                              DO                                  DOMAIN
DOUBLE                           DROP                                DUMMY
DUMP                             ELSE                                ELSEIF
ENCLOSED                         END                                 ERRLVL
ERROREXIT                        ESCAPE                              ESCAPED
EXCEPT                           EXCEPTION                           EXEC
EXECUTE                          EXISTS                              EXIT
EXPLAIN                          EXTEND                              EXTERNAL
EXTRACT                          FALSE                               FETCH
FIELD                            FIELDS                              FILE
FILLFACTOR                       FILTER                              FLOAT
FLOPPY                           FOR                                 FORCE
FOREIGN                          FOUND                               FREETEXT
FREETEXTTABLE                    FROM                                FULL
FUNCTION                         GENERATOR                           GET
GLOBAL                           GO                                  GOTO
GRANT                            GROUP                               HAVING
HOLDLOCK                         HOUR                                IDENTITY
IF                               IN                                  INACTIVE
INDEX                            INDICATOR                           INFILE
INNER                            INOUT                               INPUT
INSENSITIVE                      INSERT                              INT
INTEGER                          INTERSECT                           INTERVAL
INTO                             IS                                  ISOLATION
JOIN                             KEY                                 KILL
LANGUAGE                         LAST                                LEADING
LEFT                             LENGTH                              LEVEL
LIKE                             LIMIT                               LINENO
LINES                            LISTEN                              LOAD
LOCAL                            LOCK                                LOGFILE
LONG                             LOWER                               MANUAL
MATCH                            MAX                                 MERGE
MESSAGE                          MIN                                 MINUTE
MIRROREXIT                       MODULE                              MONEY
MONTH                            MOVE                                NAMES
NATIONAL                         NATURAL                             NCHAR
NEXT                             NEW                                 NO
NOCHECK                          NONCLUSTERED                        NONE
NOT                              NULL                                NULLIF
NUMERIC                          OF                                  OFF
OFFSET                           OFFSETS                             ON
ONCE                             ONLY                                OPEN
OPTION                           OR                                  ORDER
OUTER                            OUTPUT                              OVER
OVERFLOW                         OVERLAPS                            PAD
PAGE                             PAGES                               PARAMETER
PARTIAL                          PASSWORD                            PERCENT
PERM                             PERMANENT                           PIPE
PLAN                             POSITION                            PRECISION
PREPARE                          PRIMARY                             PRINT
PRIOR                            PRIVILEGES                          PROC
PROCEDURE                        PROCESSEXIT                         PROTECTED
PUBLIC                           PURGE                               RAISERROR
READ                             READTEXT                            REAL
REFERENCES                       REGEXP                              RELATIVE
RENAME                           REPEAT                              REPLACE
REPLICATION                      REQUIRE                             RESERV
RESERVING                        RESET                               RESTORE
RESTRICT                         RETAIN                              RETURN
RETURNS                          REVOKE                              RIGHT
ROLLBACK                         ROLLUP                              ROWCOUNT
RULE                             SAVE                                SAVEPOINT
SCHEMA                           SECOND                              SECTION
SEGMENT                          SELECT                              SENSITIVE
SEPARATOR                        SEQUENCE                            SESSION_USER
SET                              SETUSER                             SHADOW
SHARED                           SHOW                                SHUTDOWN
SINGULAR                         SIZE                                SMALLINT
SNAPSHOT                         SOME                                SORT
SPACE                            SQL                                 SQLCODE
SQLERROR                         STABILITY                           STARTING
STARTS                           STATISTICS                          SUBSTRING
SUM                              SUSPEND                             TABLE
TABLES                           TAPE                                TEMP
TEMPORARY                        TEXT                                TEXTSIZE
THEN                             TIME                                TIMESTAMP
TO                               TOP                                 TRAILING
TRAN                             TRANSACTION                         TRANSLATE
TRIGGER                          TRIM                                TRUE
TRUNCATE                         UNCOMMITTED                         UNION
UNIQUE                           UNTIL                               UPDATE
UPDATETEXT                       UPPER                               USAGE
USE                              USER                                USING
VALUE                            VALUES                              VARCHAR
VARIABLE                         VARYING                             VERBOSE
VIEW                             VOLUME                              WAIT
WAITFOR                          WHEN                                WHERE
WHILE                            WITH                                WORK
WRITE                            WRITETEXT                           XOR
YEAR                             ZONE

上一篇:附录D SQL入门之SQL语句的语法

文章来源:https://blog.csdn.net/warlack007/article/details/135010652
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。