数据库的保留关键字列表

在 SuperMap 中创建表(如属性表、数据集等)和字段的时候,对字段名称和数据集的名称有一定的限制:

  • 由汉字、字母、数字和下划线组成,但不能以数字、下划线以及“sm”开头。“sm”为 UDB 引擎的系统默认字段的保留关键字。

    特别说明,不能新建以“sm”开头的字段,但是可以创建以“sm”开头的数据集。

  • 不能以“ssl”命名字段,系统会自动为其添加“_user”后缀。
  • 名称长度不得为0,也不得超过30个字节(即30个英文字母或者15个汉字)。
  • 不能有非法字符,除数字、字母、汉字、下划线以外的所有字符,如空格、括号等。
  • 不能与各个数据库的保留字段冲突。

UDB、Oracle、SQL Server 等数据库均有一些保留的关键字,在 SuperMap 中创建表和字段的时候,表名和字段名都不能使用这些关键字。现在把 UDB/UDBX和 Oracle 数据库关键字整理出来,希望给用户带来一些方便。除了下面列出的保留关键字外,Oracle 对系统自动生成的对象及子对象以"SYS_"开头,因此 Oracle 会阻止用户为指定的对象或子对象以"SYS_"为前缀,否则有可能引起命名解析冲突。

UDB/UDBX 数据库保留关键字

ABORT CAST DETACH HAVING LIKE QUERY TO
ACTION CHECK DISTINCT IF LIMIT RAISE THEN
ADD COLLATE DROP IGNORE LINES REFERENCES TRANSACTION
AFTER COLUMN EACH IMMEDIATE MATCH REGEXP TRIGGER
ALL COMMIT ELSE IN NATURAL REINDEX UNION
ALTER CONFLICT END INDEX NO RELEASE UNIQUE
ANALYZE CONSTRAINT ESCAPE INDEXED NOT RENAME UPDATE
AND CREATE EXCEPT INITIALLY NOTNULL REPLACE USING
AS CROSS EXCLUSIVE INNER NULL RESTRICT VACUUM
ASC CURRENT_DATE EXISTS INSERT OF RIGHT VALUES
ATTACH CURRENT_TIME EXPLAIN INSTEAD OFFSET ROLLBACK VIEW
AUTOINCREMENT CURRENT_TIMESTAMP FAIL INTERSECT ON ROW VIRTUAL
BEFORE DATABASE FOR INTO OR SAVEPOINT WHEN
BEGIN DEFAULT FOREIGN IS ORDER SELECT WHERE
BETWEEN DEFERRABLE FROM ISNULL OUTER SET  
BY DEFERRED FULL JOIN PLAN TABLE  
CASCADE DELETE GLOB KEY PRAGMA TEMP  
CASE DESC GROUP LEFT PRIMARY TEMPORARY  

Oracle 数据库保留关键字

ABORT COMMIT EXIT LIMITED OTHERS ROWNUM TEXT
ACCEPT COMPRESS FALSE LINES OUT ROWS THEN
ACCESS CONNECT FETCH LOCK PACKAGE ROWTYPE TO
ADD CONSTANT FILE LONG PARTITION RUN TRIGGER
ALL CRASH FLOAT LOOP PCTFREE SAVEPOINT TRUE
ALTER CREATE FOR MAX PLS_INTEGER SCHEMA TYPE
AND CURRENT FROM MAXEXTENTS POSITIVE SELECT UID
ANY CURRVAL MINUS MIN POSITIVEN SEPARATE UNION
ARRAY CURSOR FUNCTION MLSLABEL PRAGMA SESSION UNIQUE
ARRAYLEN DATABASE GENERIC MOD PRIOR SET UPDATE
AS DATA_BASE GOTO MODE PRIVATE SHARE USE
ASC DATE GRANT MODIFY PRIVILEGES SIZE USER
ASSERT DBA GROUP NATUAL PROCEDURE SMALLINT VALIDATE
ASSIGN DEBUGOFF HAVING NATURALN PUBLIC SPACE VALUES
AT DEBUGON IDENTIFIED NEW RAISE SQL VARCHAR
AUDIT DECLARE IF NEXTVAL RANGE SQLCODE VARCHAR2
BETWEEN DECIMAL IMMEDIATE NOAUDIT RAW SQLERRM VARIANCE
BINARY_INTEGER DEFAULT IN NOCOMPRESS REAL START VIEW
BODY DEFINITION INCREMENT NOT RECORD STATE VIEWS
BOOLEAN DELAY INDEX NOWAIT REF STATEMENT WHEN
BY DELETE INDEXES NULL RELEASE STTDEV WHENEVER
CASE DESC INDICATOR NUMBER REMR SUBTYPE WHERE
CHAR DIGITS INITIAL NUMBER_BASE RENAME SUCCESSFUL WHILE
CHAR_BASE DISPOSE INSERT OF RESOURCE SUM WITH
CHECK DISTINCT INTEGER OFFLINE RETURN SYNONYM WORK
CLOSE DO INTERFACE ON REVERSE SYSDATE WRITE
CLUSTER DROP INTERSECT ONLINE REVOKE TABAUTH XOR
CLUSTERS ELSE INTO OPEN ROLLBACK TABLE  
COLAUTH ELSIF IS OPTION ROW TABLES  
COLUMN EXCLUSIVE LEVEL OR ROWID TASK  
COMMENT EXISTS LIKE ORDER ROWLABEL TERMINATE