Skip navigation
Currently Being Moderated

Finding the number of rows updated in a cfquery oracle update statement

Jun 5, 2009 5:48 AM

Hi

 

If I wanted to find the number of rows updated in a query in sql server i just do my update then do a select on the @@identity column.

 

eg)

 

<cfquery name="qUpdate" datasource="#dsn#">

update table a

set      column1 = bla

where  column2 = 1

 

select @@identity as noOfRowsUpdated

</cfquery>

 

 

I can then get the result by accessing qUpdate.noOfRowsUpdated.

 

However in Oracle @@identity does not exist.  They do however have row%count.  Does anyone know how to get this to work properly or is there a more simple / elegant solution?

 

Thanks in advance,

Michael

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points