How can I get the number of records affected by a stored procedure?

Answer

Register an out parameter for the stored procedure, and set the value based on @@ROWCOUNT if using SQL Server. Use SQL%ROWCOUNT if you are using Oracle.

Mind that if you have multiple INSERT/UPDATE/DELETEs, you'll need a variable to store the result from @@ROWCOUNT for each operation.

All plsql Questions

Ask your interview questions on plsql

Write Your comment or Questions if you want the answers on plsql from plsql Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---