Home » RDBMS Server » Server Administration » after an update, how do i find out how many rows were updated?
after an update, how do i find out how many rows were updated? [message #370764] Wed, 02 February 2000 16:05 Go to next message
jeff stevens
Messages: 2
Registered: February 2000
Junior Member
i can't seem to find this in the docs. is there a global variable that holds the number of rows that were affected by the last statement?
thanks!
Re: after an update, how do i find out how many rows were updated? [message #370765 is a reply to message #370764] Wed, 02 February 2000 16:25 Go to previous messageGo to next message
jeff stevens
Messages: 2
Registered: February 2000
Junior Member
i got the answer: sql%rowcount.
thanks!
Re: after an update, how do i find out how many rows were updated? [message #370767 is a reply to message #370765] Thu, 03 February 2000 01:40 Go to previous message
ata_ur
Messages: 1
Registered: February 2000
Junior Member
Hello,

Good Day!

You can achieve that in 3 different methods. The first one is an ugly process but worthful.

1) Create a global variable and assign it as '1' then will updating the record increment the value by 1 and display that whenever necessary.

2) Magic trigger have access to extra boolean variable that can be used to programmatically identify the trigger type. Like...

If Inserting .....
[[ Then write the code......]]
...
...

If Updating .....
[[ write the code...........]]
...
...

3) At the DBA level, while at Two-phase commits ehich provide automatic, tranparent updates that guarantee that all databases updated via a single ditributed transaction either commit or rollback as a single unit. with IN-DOUBT database locks and DATABASE LEAF BLOCKS you can achieve that.

4) with DB_FILE_MULTIBLOCK_READ_COUNT and with TKPROF and EXPLAIN PLAIN we can find out.

5) With Oracle Cursor Vaiable we can only find out the number of rows affected(updated).

Thanks,
ata_ur_rehman
Previous Topic: Impossible..................Possible............
Next Topic: Impossible..................Possible............
Goto Forum:
  


Current Time: Wed Oct 21 11:56:23 CDT 2020