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



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

Answer / Amit Khanna

In PL/SQL, you can use the `sql%ROWCOUNT` attribute to obtain the number of rows affected by a DML statement (INSERT, UPDATE, DELETE) executed within a stored procedure. Assign the value of `sql%ROWCOUNT` to a variable before exiting the procedure.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

What is the use of time stamp in select statement?

1 Answers   TCS,


What is the difference between left outer join and left join?

1 Answers  


Write a program that shows the usage of while loop to calculate the average of user entered numbers and entry of more numbers are stopped by entering number 0?

1 Answers  


What are the constraints available in sql?

1 Answers  


Does a join table need a primary key?

1 Answers  


Does view contain data?

1 Answers  


Is like operator in sql case sensitive?

1 Answers  


What has stored procedures in sql?

1 Answers  


what is the difference between nested subquery and correlated subquery?

1 Answers  


How sql query is executed?

1 Answers  


How to revise and re-run the last sql command?

1 Answers  


I have a Employee table with columns ename,eid,salary,deptno. How to retrieve sum of salary for each deptno?

8 Answers   L&T,


Categories