欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

MySQL保留关键字_MySQL

程序员文章站 2022-05-25 14:09:57
...
bitsCN.com

MySQL保留关键字

今天在使用hibernate关联映射导出表的时候因为映射了一个表名为option,是MYSQL的关键字,总是生成错误,一开始以为是映射文件和代码问题,检查不出问题才想到可能用到数据库的保留关键字了,查了一下才知道.看来命名还是得注意点.

ADD ALL ALTERANALYZE AND ASASC ASENSITIVE BEFOREBETWEEN BIGINT BINARYBLOB BOTH BYCALL CASCADE CASECHANGE CHAR CHARACTERCHECK COLLATE COLUMNCONDITION CONNECTION CONSTRAINTCONTINUE CONVERT CREATECROSS CURRENT_DATE CURRENT_TIMECURRENT_TIMESTAMP CURRENT_USER CURSORDATABASE DATABASES DAY_HOURDAY_MICROSECOND DAY_MINUTE DAY_SECONDDEC DECIMAL DECLAREDEFAULT DELAYED DELETEDESC DESCRIBE DETERMINISTICDISTINCT DISTINCTROW pDOUBLE DROP DUALEACH ELSE ELSEIFENCLOSED ESCAPED EXISTSEXIT EXPLAIN FALSEFETCH FLOAT FLOAT4FLOAT8 FOR FORCEFOREIGN FROM FULLTEXTGOTO GRANT GROUPHAVING HIGH_PRIORITY HOUR_MICROSECONDHOUR_MINUTE HOUR_SECOND IFIGNORE IN INDEXINFILE INNER INOUTINSENSITIVE INSERT INTINT1 INT2 INT3INT4 INT8 INTEGERINTERVAL INTO ISITERATE JOIN KEYKEYS KILL LABELLEADING LEAVE LEFTLIKE LIMIT LINEARLINES LOAD LOCALTIMELOCALTIMESTAMP LOCK LONGLONGBLOB LONGTEXT LOOPLOW_PRIORITY MATCH MEDIUMBLOBMEDIUMINT MEDIUMTEXT MIDDLEINTMINUTE_MICROSECOND MINUTE_SECOND MODMODIFIES NATURAL NOTNO_WRITE_TO_BINLOG NULL NUMERICON OPTIMIZE OPTIONOPTIONALLY OR ORDEROUT OUTER OUTFILEPRECISION PRIMARY PROCEDUREPURGE RAID0 RANGEREAD READS REALREFERENCES REGEXP RELEASERENAME REPEAT REPLACEREQUIRE RESTRICT RETURNREVOKE RIGHT RLIKESCHEMA SCHEMAS SECOND_MICROSECONDSELECT SENSITIVE SEPARATORSET SHOW SMALLINTSPATIAL SPECIFIC SQLSQLEXCEPTION SQLSTATE SQLWARNINGSQL_BIG_RESULT SQL_CALC_FOUND_ROWS SQL_SMALL_RESULTSSL STARTING STRAIGHT_JOINTABLE TERMINATED THENTINYBLOB TINYINT TINYTEXTTO TRAILING TRIGGERTRUE UNDO UNIONUNIQUE UNLOCK UNSIGNEDUPDATE USAGE USEUSING UTC_DATE UTC_TIMEUTC_TIMESTAMP VALUES VARBINARYVARCHAR VARCHARACTER VARYINGWHEN WHERE WHILEWITH WRITE X509XOR YEAR_MONTH ZEROFILL

MySQL允许部分关键字用做未引起来的识别符,因为许多人以前曾使用过它们。下面列出了一些例子:

ACTION     BIT       DATE      ENUM      NO     TEXT      TIME         TIMESTAMP


bitsCN.com