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 |
Describe the different type of Integrity Constraints supported by ORACLE ?
How do I find my oracle client driver version?
 What are the oracle DML commands possible through an update strategy?
What is cluster Key ?
How to shutdown your 10g xe server?
What is enter substitution variable in oracle?
How to delete an existing row from a table in oracle?
why can't we assign not null constraint as table level constraint
How to define an explicit cursor in oracle?
What is an oracle table?
What is tns service name?
Can multiple columns be used in group by in oracle?