达梦数据库关键字介绍

达梦数据库 关键字和 保留字

以下不带 *号的为关键字,带 *号的为系统保留字。
DM 还将保留字进一步划分为 SQL 保留字、DMSQL 程序保留字、模式保留字、变量保留
字和别名保留字,具体请查询系统视图


SELECT * FROM V$RESERVED_WORDS;

注意:关键字

  ROWID、 TRXID、 VERSIONS_STARTTIME、 VERSIONS_ENDTIME、
  VERSIONS_STARTTRXID、 VERSIONS_ENDTRXID
 和  VERSIONS_OPERATION 

^以上关键字 ^不能作为表的列名,即使加上双引号也不行。

--------------------------------------------------------------------------------------------------------------
V 以下的可以加 双引号V
若程序中使用到的关键字较多,手动加双引号 工作量会成正比增加
那么有两种方法来简单解决:

方法1:
dm_svc.conf 的配置文件只需加上一个参数与参数值即可

参数名 默认值 简述
KEYWORDS 标识用户关键字,所有在列表中的字符串,如果以单词的形式出现在 SQL 语句中,则这个单词会被加上双引号。该参数主要用来解决用户需要使用 DM8 中的保留字作为对象名使用的状况。

方法2:
在 实例的配置文件 dm.ini 的一个参数名后面追加关键字即可


EXCLUDE_RESERVED_WORDS =ADMIN,DATA,KEY

V$RESERVED_WORDS 保留字统计表,
记录保留字的分类信息。 RES_FIXED=N 的关键字,
通过 ini 参数
EXCLUDE_RESERVED_WORDS 设置之后会失 效,此视图不会再记录。


A
ABORT* ABSOLUTE* ABSTRACTACCESSEDACCOUNTACROSSACTION* ADD* ADMINADVANCEDAFTERAGGREGATE* ALLALLOW_DATETIMEALLOW_IP* ALTERANALYZE* AND* ANYAPRARCHIVEARCHIVEDIRARCHIVELOGARCHIVESTYLE* ARRAY* ARRAYLEN* AS* ASCASCIIASENSITIVE* ASSIGNASYNCHRONOUSATATTACH* AUDITAUGAUTHID* AUTHORIZATIONAUTOAUTOEXTENDAUTONOMOUS_TRANSACTIONAVG
B
BACKEDBACKUPBACKUPDIRBACKUPINFOBACKUPSETBADFILEBAKFILEBASEBEFORE* BEGIN* BETWEEN* BIGDATEDIFFBIGINTBINARYBITBITMAPBLOBBLOCK* BOOLBOOLEAN* BOTHBRANCHBREADTH* BREAK* BSTRINGBTREEBUFFERBUILDBULK* BYBYDAYBYHOURBYMINUTEBYMONTHBYMONTHDAYBYSECOND* BYTEBYWEEKNOBYYEARDAY
C
CACHECALCULATE* CALLCASCADECASCADED* CASE* CASTCATALOG* CATCHCHAIN* CHARCHARACTERCHARACTERISTICS* CHECKCIPHER* CLASSCLOBCLOSE* CLUSTER* CLUSTERBTRCOLLATE* COLLATIONCOLLECT* COLUMNCOLUMNS* COMMENT* COMMITCOMMITTED* COMMITWORKCOMPILECOMPLETECOMPRESSCOMPRESSEDCONDITIONAL* CONNECTCONNECT_BY_ISCYCLECONNECT_BY_ISLEAF* CONNECT_BY_ROOTCONNECT_IDLE_TIMECONNECT_TIME* CONSTCONSTANT* CONSTRAINTCONSTRAINTSCONSTRUCTOR* CONTAINS*
CONTEXT* CONTINUE* CONVERTCOPY* CORRESPONDINGCORRUPTCOUNTCOUNTERCPU_PER_CALLCPU_PER_SESSION* CREATE* CROSS* CRYPTOCTLFILE* CUBECUMULATIVE* CURRENTCURRENT_SCHEMACURRENT_USER* CURSORCYCLE
D
DAILYDANGLINGDATADATABASEDATAFILEDATE* DATEADD* DATEDIFF* DATEPARTDATETIMEDAYDBFILEDDLDDL_CLONEDEBUGDEC* DECIMAL* DECLARE* DECODE* DEFAULTDEFERRABLEDEFERREDDEFINER* DELETEDELETINGDELIMITEDDELTADEMANDDENSE_RANKDEPTHDEREF* DESCDETACHDETERMINISTICDEVICEDIAGNOSTICSDICTIONARYDIRECTORY* DISABLEDISCONNECT* DISKSPACE* DISTINCT* DISTRIBUTED* DO* DOMAIN* DOUBLEDOWN* DROPDUMP
E

EACH* ELSE* ELSEIF* ELSIFEMPTY* ENABLEENCRYPTENCRYPTION* END* EQUERRORERRORSESCAPEEVENTINFOEVENTSEXCEPTEXCEPTIONEXCEPTIONSEXCEPTION_INIT* EXCHANGEEXCLUDEEXCLUDINGEXCLUSIVE*
EXEC* EXECUTE* EXISTS* EXIT* EXPLAINEXTENDS* EXTERNEXTERNALEXTERNALLY* EXTRACT
F
FAILED_LOGIN_ATTEMPSFASTFEB* FETCHFIELDSFILEFILEGROUPFILESIZEFILLFACTOR* FINAL* FINALLY* FIRST* FLOATFOLLOWING*
FORFORALLFORCE* FOREIGNFORMATFREQFREQUENCEFRI* FROM* FULL* FULLY* FUNCTION
G
* GETGLOBALGLOBALLY* GOTO* GRANT* GROUP* GROUPING
H
HASH* HAVINGHEXTORAWHOLDHOURHOURLYHUGE
I
IDENTIFIED* IDENTITYIDENTITY_INSERT* IFIMAGE* IMMEDIATE*
ININCLUDEINCLUDINGINCREASEINCREMENT* INDEXINDEXESINDICESINITIALINITIALIZEDINITIALLY* INLINE* INNERINNERIDINPUTINSENSITIVE* INSERTINSERTINGINSTANTIABLEINSTEAD* INTINTEGERINTENT* INTERSECT* INTERVAL* INTOINVISIBLE* ISISOLATION
J
JAN* JAVAJOB* JOINJSON* JSON_QUERY* JSON_VALUEJULJUN
K
* KEEPKEYKEYS
L
LABELLARGELASTLAX* LEADING* LEFTLESSLEVELLEXER* LIKELIMIT* LINK* LIST* LNNVLLOBLOCALLOCALLYLOCATIONLOCKLOCKEDLOGLOGFILELOGGINGLOGIC* LOGINLOGOFFLOGONLOGOUTLONGLONGVARBINARYLONGVARCHAR* LOOPLSN
M
MANUALMAPMAPPEDMARMATCHMATCHEDMATERIALIZEDMAXMAXPIECESIZEMAXSIZEMAXVALUEMAX_RUN_DURATIONMAY* MEMBERMEMORYMEM_SPACEMERGEMINMINEXTENTS* MINUSMINUTEMINUTELYMINVALUEMIRRORMODMODEMODIFYMONMONEYMONITORINGMONTHMONTHLYMOUNTMOVEMENT*
MULTISET
N
NATIONAL* NATURALNCHARNCHARACTERNEVER* NEW* NEXTNONOARCHIVELOGNOAUDITNOBRANCHNOCACHE* NOCOPY* NOCYCLENODENOLOGGINGNOMAXVALUENOMINVALUENOMONITORINGNONENOORDERNORMALNOROWDEPENDENCIESNOSORT* NOTNOT_ALLOW_DATETIMENOT_ALLOW_IPNOVNOWAIT* NULLNULLSNUMBERNUMERIC
O
* OBJECTOCT* OFOFFOFFLINEOFFSETOLD* ONONCEONLINEONLYOPENOPTIMIZEOPTION* OR* ORDER* OUTOUTER* OVEROVERLAPS* OVERLAY* OVERRIDEOVERRIDING
P
PACKAGEPADPAGEPARALLELPARALLEL_ENABLEPARMSPARTIAL*
PARTITIONPARTITIONSPASSINGPASSWORD_GRACE_TIMEPASSWORD_LIFE_TIMEPASSWORD_LOCK_TIMEPASSWORD_POLICYPASSWORD_REUSE_MAXPASSWORD_REUSE_TIMEPATH* PENDANT* PERCENTPIPEPIPELINEDPIVOTPLACINGPLS_INTEGERPRAGMAPRECEDINGPRECISIONPRESERVEPRETTY*
PRIMARY* PRINT* PRIOR* PRIVATEPRIVILEGE* PRIVILEGES* PROCEDURE* PROTECTED* PUBLICPURGE
Q
QUERY_REWRITE_INTEGRITY
R
* RAISERANDOMLYRANGERAWTOHEXREADREADONLYREAD_PER_CALLREAD_PER_SESSIONREALREBUILD* RECORDRECORDS* REF* REFERENCE* REFERENCES* REFERENCINGREFRESHRELATED* RELATIVERENAME* REPEATREPEATABLEREPLACEREPLAY* REPLICATERESIZERESTORERESTRICTRESULTRESULT_CACHE* RETURN* RETURNING* REVERSE* REVOKE* RIGHTROLE* ROLLBACKROLLFILE* ROLLUPROOT* ROWROWCOUNTROWDEPENDENCIESROWID* ROWNUM* ROWSRULE
S
SALTSAMPLESATSAVE* SAVEPOINT* SBYTE* SCHEMASCOPESCROLL* SEALEDSEARCHSECONDSECONDLY* SECTIONSEED* SELECTSELFSENSITIVESEPSEQUENCESERERRSERIALIZABLESERVERSESSIONSESSION_PER_USER* SET* SETSSHARE* SHORTSHUTDOWNSIBLINGSSIMPLESINCESIZE*
SIZEOFSKIPSMALLINTSNAPSHOT* SOMESOUNDSPACESPANSPATIALSPFILESPLITSQLSTANDBYSTARTUPSTATSTATEMENT* STATICSTDDEVSTORAGESTORESTRICTSTRING* STRUCTSTYLE* SUBPARTITIONSUBPARTITIONSSUBSTRINGSUBTYPESUCCESSFULSUMSUNSUSPEND* SWITCHSYNCSYNCHRONOUS* SYNONYMSYSTEMSYS_CONNECT_BY_PATH
T
* TABLETABLESPACETASKTEMPLATETEMPORARYTEXTTHANTHENTHREAD* THROWTHUTIESTIMETIMERTIMESTIMESTAMP* TIMESTAMPADD*
TIMESTAMPDIFFTIME_ZONETINYINT* TO* TOPTRACE* TRAILINGTRANSACTIONTRANSACTIONAL* TRIGGERTRIGGERS* TRIM* TRUNCATETRUNCSIZETRXID* TRYTUETYPE* TYPEDEF* TYPEOF
U
* UINT* ULONGUNBOUNDEDUNCOMMITTEDUNCONDITIONALUNDER* UNION* UNIQUEUNLIMITEDUNLOCKUNPIVOT* UNTILUNUSABLEUP* UPDATEUPDATINGUSAGE* USERUSE_HASHUSE_MERGEUSE_NLUSE_NL_WITH_INDEX* USHORT* USINGVALUE* VALUESVARBINARYVARCHARVARCHAR2VARIANCE
V
* VARRAYVARYING* VERIFYVERSIONSVERSIONS_ENDTIMEVERSIONS_ENDTRXIDVERSIONS_OPERATIONVERSIONS_STARTTIMEVERSIONS_STARTTRXIDVERTICAL* VIEW* VIRTUAL* VISIBLE* VOIDVSIZE

W
WAITWEDWEEKWEEKLY* WHEN* WHENEVER* WHERE* WHILE* WITH*WITHINWITHOUTWORKWRAPPEDWRAPPERWRITE
X
XML* XMLPARSE* XMLTABLE
Y
YEARYEARLY
Z
ZONE

你可能感兴趣的:(数据库,数据库)