Home > Database > Mysql Tutorial > body text

MySQL保留关键字_MySQL

WBOY
Release: 2016-06-01 13:32:20
Original
1067 people have browsed it

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
Copy after login

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

ACTION     BIT       DATE      ENUM      NO     TEXT      TIME         TIMESTAMP
Copy after login

 


bitsCN.com
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!