Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How many rows affected by UPDATE statement?

Status
Not open for further replies.

jgotthelf

Programmer
Aug 1, 2000
8
US
Hi,

I'm accessing Oracle via ODBC Passthrough - and after and UPDATE or INSERT I need to find out how many records were

updated. IN SQL Server I do:

update table_name set value = 42 where key_field = 11
select @@rowcount

If the update was successfull, @@rowcount returns a 1, else it returns a zero.

How can I accomplish the same in Oracle?
 
you can use SQL%ROWCOUNT to acheive the same result.

hope this helps,
Jaikish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top