日期:2014-05-17  浏览次数:20931 次

主键ID产生的问题
语句如下:
insert   into   hetong   (supplier,supplier_name,postion,pay_out,need,qixian,ht_date,input_name,zhuangtai,hetong_no,tiao_one,tiao_two,tiao_three,tiao_four,tiao_five,tiao_six,tiao_serven,tiao_eight,tiao_nine,qita,leibie,pay_per,modify,bumen,tiao_ten)   values( ' "&supplier& " ', ' "&supplier_name& " ', ' "&postion& " ', ' "&pay_out& " ', ' "&need& " ', ' "&qixian& " ', ' "&date()& " ', ' "&session( "username ")& " ', '未审核 ', ' "&lb_yuanliao&date()&good& " ', ' "&tiao_one& " ', ' "&tiao_two& " ', ' "&tiao_three& " ', ' "&tiao_four& " ', ' "&tiao_five& " ', ' "&tiao_six& " ', ' "&tiao_serven& " ', ' "&tiao_eight& " ', ' "&tiao_nine& " ', ' "&qita& " ', '辅料 ', ' "&pay_per& " ', '否 ', ' "&bumen1& " ', ' "&tiao_ten& " ')
其中ID就是主键,自动产生的。
现在我将几个参数的数据类型(如:NUMBER   由原来的NUMBERIC   改成   FLOAT)更改后,语句就不产生ID主键了?语句报错:ID不能为NULL。

------解决方案--------------------

id 数据类型 长度 允许空
改为
id 整形 长度 允许空