MySQL中遇到的幾種報錯及其解決方法
1.[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''xxx'' at line 1
解決方法:將所有的“ '' ”換成“ ·· ”(將所有的英文單引號換為Tab鍵上面的那個點號)
2.[Err] 1100 - Table 'xxx' was not locked with LOCK TABLES
解決方法:加上UNLOCK TABLES;這句代碼
3.[Err] 1063 - Incorrect column specifier for column 'xxx'
解決方法:INT型:max=255,不能超; FLOAT型:必須要這樣用:float(m,n),m為顯示長度,n為小數位數。
4.[Err] 1426 - Too big precision 10 specified for column 'T_START_TIME'. Maximum is 6.
解決方法:TIME類型的數據最大只能為6,將TIME后面括號里的數字改為6。(一般這個報錯都是因為你寫的數字>6了)
PS:注釋“--”符號后面要有空格,否則也會報錯。
【如果之后遇到其他問題會再更新完善】