1. 程式人生 > >ssh開發中插入資料時遇到 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right

ssh開發中插入資料時遇到 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right

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 'use'

這個問題困擾了一些時間,雖然知道有語法錯誤,可是沒有想到問題所在,不過最終發現是由於mysql資料庫中use是關鍵字,所以在建表時不要把它作為欄位名稱,否則會引起上述問題!!!