读书人

简单sql有关问题.

发布时间: 2012-02-29 16:44:10 作者: rapoo

简单sql问题请教各位..
insert into sa_quomain(cstcode,cexch_name,iexchrate,ccuscode,ccusoaddress,cdefine2,cpaycode,cpersoncode,cdepcode,cdefine1,cdefine10,cmemo,ccode,ddate,cmaker,cverifier,ivtid,id) values( 'DD ', 'HKD ', ' ', ' ', ' ', ' ', ' ', ' ', 'LH0201 ', ' ', ' ', ' ', ' ', 'Q2007080001 ', '2007-8-1 ', 'young ', ' ', '8048 ', '10000597 ')

我在mssql里面插入这样一行语句的时候它提示:
There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.

请问我的插入语句该怎么改呀?谢谢


[解决办法]
()里的字段数和values里的个数不同,你自己数下


[解决办法]
你先查一下插入的型是不是都了。有就是字段和要。
[解决办法]
同意上,有可能是id是自增的,不用入在insert句中,有一可能是不

读书人网 >SQL Server

热点推荐