日期:2014-05-19  浏览次数:20374 次

简单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語句中,還有一個可能是參數個數不對