Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to UPDATE using ROWNUM and ORDER BY
Sandy wrote:
> UPDATE MYTABLE
> SET COL1 = :newValue
> WHERE COL1 = 0
> AND ROWNUM = 1
> ORDER BY COL2;
>
> How can I achieve the above
Rows are numbered before being ordered.
You have to use an ordered sub query, then apply criteria on rownum.
AD Received on Tue Aug 10 2004 - 10:52:27 CDT
![]() |
![]() |