After update how do u know how many records got updated
Answer Posted / svj
Using SQL Cursor Attribute,'SQL%ROWCOUNT' which gives
no.of rows affected by the most recentSQL statement (an
integer value), one can know no.of records got updated.
For Example :
VARIABLE rows_updated VARCHAR(30)
DECALRE
v_dept_no departments.department_id%TYPE := 20
BEGIN
UPDATE employees
SET salary = salary + 1000
WHERE department_id = v_dept_no;
: rows_updated := (SQL%ROWCOUNT || 'rows updated.');
END;
/
PRINT rows_updated
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
What is the cache hit ratio, what impact does it have on performance of an Oracle database and what is involved in tuning it?
Is it possible to center an object horizontally in a repeating frame that has a variable horizontal size ?
How to check your oracle database 10g xe installation?
What does sharding mean?
What is a tns service name?
What is oracle rowcount?
What is the best way to do multi-row insert in oracle?
How to build data dictionary view an new database?
How to write a query with a right outer join in oracle?
What would you do with an in-doubt distributed transaction?
How to view the tablespaces in the current database?
How to retrieve the count of updated rows?
Explain the use of online redo log files in oracle.
How can we delete duplicate rows in a table?
what is the scenario where you take the database to NoArchivelog mode?