国产视频app在使用 php + mysql 程序時,有時候定義的數據表的字段會和 mysql 的關鍵字發生沖突,造成程序無法運行的錯誤。而這種錯誤最典型的就是“SQL Error: 1064, SQLState: 42000錯誤”。為了防止此錯誤的出錯,下面列出了一些 mysql 的關鍵字。

mysql 關于關鍵字沖突的錯誤

SQL Error: 1064, SQLState: 42000錯誤

国产视频appMySQL server version for the right syntax to use near

mysql 關鍵字表

ADDALL
ALTERANALYZE
ANDAS
ASCASENSITIVE
BEFOREBETWEEN
BIGINTBINARY
BLOBBOTH
BYCALL
CASCADECASE
CHANGECHAR
CHARACTERCHECK
COLLATECOLUMN
CONDITIONCONNECTION
CONSTRAINTCONTINUE
CONVERTCREATE
CROSSCURRENT_DATE
CURRENT_TIMECURRENT_TIMESTAMP
CURRENT_USERCURSOR
DATABASEDATABASES
DAY_HOURDAY_MICROSECOND
DAY_MINUTEDAY_SECOND
DECDECIMAL
DECLAREDEFAULT
DELAYEDDELETE
DESCDESCRIBE
DETERMINISTICDISTINCT
DISTINCTROWDIV
DOUBLEDROP
DUALEACH
ELSEELSEIF
ENCLOSEDESCAPED
EXISTSEXIT
EXPLAINFALSE
FETCHFLOAT
FLOAT4FLOAT8
FORFORCE
FOREIGNFROM
FULLTEXTGOTO
GRANTGROUP
HAVINGHIGH_PRIORITY
HOUR_MICROSECONDHOUR_MINUTE
HOUR_SECONDIF
IGNOREIN
INDEXINFILE
INNERINOUT
INSENSITIVEINSERT
INTINT1
INT2INT3
INT4INT8
INTEGERINTERVAL
INTOIS
ITERATEJOIN
KEYKEYS
KILLLABEL
LEADINGLEAVE
LEFTLIKE
LIMITLINEAR
LINESLOAD
LOCALTIMELOCALTIMESTAMP
LOCKLONG
LONGBLOBLONGTEXT
LOOPLOW_PRIORITY
MATCHMEDIUMBLOB
MEDIUMINTMEDIUMTEXT
MIDDLEINTMINUTE_MICROSECOND
MINUTE_SECONDMOD
MODIFIESNATURAL
NOTNO_WRITE_TO_BINLOG
NULLNUMERIC
NUMERICON
OPTIMIZEOPTION
OPTIONALLYOR
ORDEROUT
OUTEROUTFILE
PRECISIONPRIMARY
PROCEDUREPURGE
RAID0RANGE
READREADS
REALREFERENCES
REGEXPRELEASE
RENAMEREPEAT
REPLACEREQUIRE
RESTRICTRETURN
REVOKERIGHT
RLIKESCHEMA
SCHEMASSECOND_MICROSECOND
SELECTSENSITIVE
SEPARATORSET
SHOWSMALLINT
SPATIALSPECIFIC
SQLSQLEXCEPTION
SQLSTATESQLWARNING
SQL_BIG_RESULTSQL_CALC_FOUND_ROWS
SQL_SMALL_RESULTSSL
STARTINGSTRAIGHT_JOIN
TABLETERMINATED
THENTINYBLOB
TINYINTTINYTEXT
TOTRAILING
TRIGGERTRUE
UNDOUNION
UNIQUEUNLOCK
UNSIGNEDUPDATE
USAGEUSE
USINGUTC_DATE
UTC_TIMEUTC_TIMESTAMP
VALUESVARBINARY
VARCHARVARCHARACTER
VARYINGWHEN
WHEREWHILE
WITHWRITE
X509XOR
YEAR_MONTHZEROFILL