update tableA a
set (a.col1,a.col2,a.seqid)
=(
select B.col1,B.col2,seq_sino_id.nextval
from tableB b
where a.fid = b.fid
)
where a.seqid is null;
这里面的seq_sino_id 是一个序列编译时会报错:此处不充许序号。
------------------------------请问大侠们这个语句要怎么改才能达到目的?
set (a.col1,a.col2,a.seqid)
=(
select B.col1,B.col2,seq_sino_id.nextval
from tableB b
where a.fid = b.fid
)
where a.seqid is null;
这里面的seq_sino_id 是一个序列编译时会报错:此处不充许序号。
------------------------------请问大侠们这个语句要怎么改才能达到目的?
set (a.col1,a.col2,a.seqid)
=(
select B.col1,B.col2,rownum
from tableB b
where a.fid = b.fid
)
where a.seqid is null;
update tableA a
set (a.col1,a.col2,a.seqid)
=(
select B.col1,B.col2,1000+rownum*2 --这个不就相当于序列了吗?
from tableB b
where a.fid = b.fid
)
where a.seqid is null;