What is the alternative of using a 'WHERE CURRENT OF 'Clause in a plsql statement ?

Showing Answers 1 - 3 of 3 Answers

Faizal

  • Mar 11th, 2007
 


Please try to have a record set for the cursor. Then use the current record instead of using 'where current of'.

Cheers - Faizal

  Was this answer useful?  Yes

nagurtilak

  • Mar 15th, 2007
 

It can be used in cursors

If we want to update the current record (i.e cursor holding the current  record) we can use WHERE CURRENT clause

Eg.
UPDATE emp
SET sal=sal*10
FROM emp WHERE CURRENT of "cursor name"

  Was this answer useful?  Yes

lieni

  • Jul 30th, 2007
 

You add the psedocolumn rowid to the selected fields of the cursors body.

This rowid identifies the selected record uniquely so that you can update with it, like with the primary key (just faster).

Update tab where rowid=cur_rec.rowid;

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.