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
11. Display the client number and name and the client number and name of the person who referred that client.
What happens to the current transaction if the session is killed?
How to find the duplicate rows count from employees table in oracle?
How do you bind variables in oracle?
Can we insert data in view oracle?
what is the use of triggers in Java program? I mean where do we use triggers in Java programming?
How to retrieve the count of updated rows?
Briefly explain what is literal? Give an example where it can be used?
When do you get a .pll extension in oracle? Explain its importance
How to create id with auto_increment on oracle?
What is an oracle function?
1) Does oracle have any table which contain all the exceptions and it's code internally?
What is index-organized table in Oracle?
WHAT IS ecc 6.0
How to convert raw data type into text in oracle? Explain