to BlueSuperMan:
update tables set col3=.....
where rownum=3
错
to leecooper:
update table1 set col1= ..., col2= ..., col3=...
( Select * from (select p.*, rownum rnum
from (select * from table1) p where rownum <4
) where rnum >= 3
这句里面where 怎么写?
如update table1 set col1=...
where col1='123'
and ???;
and后面用ROWNUM是错的,用条件去查询的时候ROWNUM除了=1之外,不能等于其他
to leecooper:
也许是我孤陋寡闻,我知道insert into table1 ( Select * from
(select p.*, rownum rnum
from (select * from table1) p where rownum <4
) where rnum >= 3
这样是可以的,但是update没有试过。
update table1 set col1= ..., col2= ..., col3=...
( Select * from (select p.*, rownum rnum
from (select * from table1) p where rownum <4
) where rnum >= 3