Q
Problem solve Get help with specific problems with your technologies, process and projects.

Getting total number of rows inserted and updated

How can you get a count of rows updated and inserted using the MERGE function? SQL%COUNT will return a sum of both. How can I get separate totals?

You can't get seperate totals for Oracle 9i's new MERGE statement. This is because SQL%ROWCOUNT will tell you how many rows were affected by the SQL statement and nothing further. If you want seperate totals, you'll have to perform two separate statements, UPDATE and INSERT.

For More Information


Dig Deeper on Oracle database design and architecture

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close