create sequence SEQ
minvalue 1
maxvalue 999999999999999999999999999
start with 1000
increment by 1
cache 30
order;insert into C(aid, aname, bid, bname, key, num)
select aid, aname, bid, bname, a.key,seq.nextval
from a,b
where a.key=b.key
minvalue 1
maxvalue 999999999999999999999999999
start with 1000
increment by 1
cache 30
order;insert into C(aid, aname, bid, bname, key, num)
select aid, aname, bid, bname, a.key,seq.nextval
from a,b
where a.key=b.key
解决方案 »
- 如何oracle 直接一起执行多条SQL语句
- Oracle中向表中插入数据错误
- 查询问题
- Oracle 9.2在WINDOW下导出的DMP文件在CentOS5.1平台上导入Oracle 10.2中时有警告,在导入过程中该注意些什么?sqlplus连接不上10g的
- update a set a01=a01+'10' 这样更新在oracle里出错为什么?
- 修改某一字段值 急急急.....在线等待
- oracle9.2.0.8 物化视图 undefined
- ORACLE列名最大宽度是多少
- 为什么我这个date类型的数据怎么插都插不进去呢?用to_date函数也不行。
- 我不小心把default profile改了,结果就有了口令使用的限制时间。我发现system用户只有十天的时间了,怎么去掉?
- 我怎么取得日期型数据的月啊
- 关于ORA-00604/ORA-04031问题
select w.aid,w.aname,w.bid,w.bname,w.key,rownum +1000
from(
select a.aid,a.aname,a.bid,a.bname,b.key
from a,b
where a.key = b.key) w
select a.aid,a.aname,a.bid,a.bname,b.key,rownum + 999
from a,b
where a.key = b.key
begin
create sequence sequence_num
start with 1000
increment by 1;
insert into c(aid, aname, bid, bname, key, num)
select a.aid, a.aname, b.bid, b.bname, c.key,sequence_num.nextval from a, b
where a.key=b.key;
commit;
end pro_c;