MySQL保留关键字_MySQL

WBOY
发布: 2016-06-01 13:32:20
原创
1067 人浏览过

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学习者快速成长!