mysql插入语句总是报错怎么回事
insertintocplsinfo('sbName','xqId','cpName','cpTime')values('aaa','2','hhh','2015/12/...
insert into cplsinfo('sbName','xqId','cpName','cpTime') values('aaa','2','hhh','2015/12/4 12:47:30')执行的时候报
[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 ''sbName','xqId','cpName','cpTime') values('aaa','2','hhh'' at line 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 ''sbName','xqId','cpName','cpTime') values('aaa','2','hhh'' at line 1,是什么问题啊?怎么解决?在线等,, 展开
展开全部
如果不是你要插入的数据跟你的表创建时不一致的话,我想应该就是你明明只插入一条语句但却用了values的缘故,也就是把
insert into cplsinfo('sbName','xqId','cpName','cpTime') values('aaa','2','hhh','2015/12/4 12:47:30')
改为
insert into cplsinfo('sbName','xqId','cpName','cpTime') value('aaa','2','hhh','2015/12/4 12:47:30')
把values改成value试试看行不行
insert into cplsinfo('sbName','xqId','cpName','cpTime') values('aaa','2','hhh','2015/12/4 12:47:30')
改为
insert into cplsinfo('sbName','xqId','cpName','cpTime') value('aaa','2','hhh','2015/12/4 12:47:30')
把values改成value试试看行不行
追问
改了,还是报那个错,mysql数据库不是本地数据库,是服务器上的数据库
追答
哦,那有可能是你这里
cplsinfo('sbName','xqId','cpName','cpTime')
错了,试着改成
cplsinfo(sbName,xqId,cpName,cpTime)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询