看板 Database 關於我們 聯絡資訊
資料庫是oracle Update ( Select A.a From table A Where A.b in (Select B.b From table A,table B Where A.b=B.b and A.c is null And B.c='Y')) Set A.a ='Y' ; 我寫了一個procedure如上,上面update的筆數是15筆 想請問有沒有辦法可以只update後面10筆 select * from (select * from A order by B desc ) where rownum <=1 之前找到上面這個寫法,但是因為資料庫版本太舊所以沒辦法使用 想請問一下不知道還有沒有其他方法也可以取得後面10筆的資料,謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.25.209.105
fantasyj:你上面寫的,只是sql而已.. 11/07 22:39
fantasyj:寫procedure裡面用loop去"掰"出你要的效果.. 11/07 22:45