我想更新其中第三條怎麼寫
 ------------------------
  
  你这里说的"第三条"具体是个什么概念? 我理解为按一定的排序
  规则筛选出来的,既然你能定义这个规则,就照着这个规则去update  假如按照ronum排序:   update  table1  set col1= ..., col2= ..., col3=...
   ( Select  * from (select p.*, rownum rnum 
          from (select * from table1) p  where rownum <4
     ) where rnum >= 3
 

解决方案 »

  1.   

    update tables set col3=.....
    where rownum=3
      

  2.   

    where rownum=3?这也可以的啊。
      

  3.   

    第三条只是一个例子,按顺序排列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之外,不能等于其他
      

  4.   

    这个问题还是没有解决,不过程序开发是完成了,因为换了一种方式实现。to leecooper:
    也许是我孤陋寡闻,我知道insert into table1 ( Select  * from 
                                       (select p.*, rownum rnum 
                               from (select * from table1) p  where rownum <4
                           ) where rnum >= 3
    这样是可以的,但是update没有试过。
      

  5.   

    update  table1  set (col1, col2, col3)=( Select col1,col2,col3 from  from table2 where table1.id=table2.id where rownum <2
         ) where rownum <= 3;