merge into foo
using
(
select rowid as rid,
row_number() over (order by date_value) as seqno
from foo
) t on (foo.rowid = t.rid)
when matched then update
set srno = t.seqno;
SQLFiddleデモ: http://sqlfiddle.com/#!4/d8cc5/2 >
merge into foo
using
(
select rowid as rid,
row_number() over (order by date_value) as seqno
from foo
) t on (foo.rowid = t.rid)
when matched then update
set srno = t.seqno;
SQLFiddleデモ: http://sqlfiddle.com/#!4/d8cc5/2 >