罗盘使用说明:SQL语法错误急救

来源:百度文库 编辑:高考问答 时间:2024/05/01 05:55:27
insert into order(all_order_oid,order_serial,company_id,allot_id,userid,total,state,audit,audit_dateline,name,tel,mobile,country_code,address,expect_date,payfor_type,transit,payout,flag,dateline) values('20060713-5642-00002','20060713-5642-00002-00003',3,0,5,100,0,0,0,'trueName','12345678','012345678901','106102104121','天河区瑞华大厦8H','1159943779',0,0,0,0,1152786979)

错误现示:
MySQL 返回:

#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 'order(all_order_oid,order_serial,company_id,allot_id,userid,tota

上面说的对 order是关键字 但是在mysql中 用“`”这个符号
这是键盘1 前面那个 不是单引号 写成这样就可以了“`order`”

我认为你的语句里有些字段的数据类型可能不对,你应该检查一下数据类型
比如company_id字段我认为就是字符型的,而你对应赋值却是3而不是'3'我觉得就不正确,其他字段也检查一下,如果都对应好了就会正常通过语句了

[order] 是关键字 加个中括号就可以了