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

oracle主键问题
Oracle 主键设置成了varchar型  要求自动生成主键  怎么写代码

------解决方案--------------------
创建序列:

create sequence SEQ
minvalue 1
maxvalue 999999999999999999999999999
start with 61
increment by 1
cache 30
order;

使用:

insert into tname values(to_char(SEQ.nextval),其他字段值)