After update how do u know how many records got updated
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / pkd
Except sql%rowcount,using returning clause with count()
function
| Is This Answer Correct ? | 1 Yes | 1 No |
How to define a variable to match a table column data type?
How i can handle exception in large code like 1000 line without distrubing the code or without exception handler sction?
What is Virtual Private Database in Oracle?
Why we use bulk collect in oracle?
What is enter substitution variable in oracle?
How to install oracle database 10g xe?
How to convert dates to characters in oracle?
How can we find out the duplicate values in an oracle table?
Give the sequence in which triggers fired during insert operations, when the following 3 triggers are defined at the same block level ?
Assuming that you are an End User How to find that in the payment Batch some of the Invoice was Missing To pay How to find That??
What is a nvl function?
where we have to use ON clause and where we have to use USING clause in JOINS