MySQL保留关键字_MySQL

WBOY
發布: 2016-06-01 13:32:20
原創
1065 人瀏覽過

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
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!