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鍵上面的那個點號)spa
2.[Err] 1100 - Table 'xxx' was not locked with LOCK TABLES
解決方法:加上UNLOCK TABLES;這句代碼server
3.[Err] 1063 - Incorrect column specifier for column 'xxx'
解決方法:INT型:max=255,不能超; FLOAT型:必需要這樣用:float(m,n),m爲顯示長度,n爲小數位數。ci
4.[Err] 1426 - Too big precision 10 specified for column 'T_START_TIME'. Maximum is 6.
解決方法:TIME類型的數據最大隻能爲6,將TIME後面括號裏的數字改成6。(通常這個報錯都是由於你寫的數字>6了)it
PS:註釋「--」符號後面要有空格,不然也會報錯。io
【若是以後遇到其餘問題會再更新完善】class