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
Explain an index?
20. Using a set operator, display the client number of all clients who have never placed an order.
A table t is there.If you perform insert ,update and delete then the trigger will fire.What is the minimum no of trigger required for a table.
How can we find out the current date and time in oracle?
What is a nested table?
What do you mean by merge in oracle and how can you merge two tables?
How to experiment a data lock in oracle?
How to use existing values in update statements using oracle?
Can we create database in oracle using command line ?
I have a parent program and a child program. I want to write a statement in Exception Block of the parent program so that when the statement in the exception block is executed, the control goes to the next statement in the parent block bypassing the child block.How do i do that?
Explain the types of exception?
How to use subqueries with the exists operator in oracle?
How to define a sub function?
What is Library Cache in Oracle?
In AP we done Customizations for Late Payments Charges. For Reporting Purpose What are the Documents Prepared for Customer Understanding??