我想实现表中 id字段自增长,
先建立序列:
create sequence identity
increment by 1
start with 1
nomaxvalue
minvalue 1
nocycle
nocache
order;
在sqlplus中 insert into table values(identity.nextval);
可以实现,但是在程序中
string sql="insert into table values("+identity.nextval+")";
却不行,请问这该怎么做才能达到预期的目的呢??