中国到新加坡:SQL语法错误急救

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/26 21:05:42
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'我觉得就不正确,其他字段也检查一下,如果都对应好了就会正常通过语句了

我已经给你答了 不知道你为什么开这么多题 那多浪费分啊

MySQL里的字段值都是用””吧