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 use of file param in imp command?
Can a formula column be obtained through a select statement ?
How to write numeric literals in oracle?
How to define a procedure inside another procedure?
How to use "while" statements in oracle?
In oracle there is column command, how will you explain that?
What is raw datatype in oracle?
Give the different types of rollback segments.
How to start instance with a minimal initialization parameter file?
What is oracle in java?
Explain the use of ignore option in imp command.
What is flashback in Oracle?
What is a relational database management system?
Is insert autocommit in oracle?
11. Display the client number and name and the client number and name of the person who referred that client.