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 |
Can group functions be used in the order by clause in oracle?
26. Display the earliest shipping date in the format: DD/MON/YYYY
How does oracle handle read consistency?
Is rowid unique in oracle?
How to put more than 1000 values into an oracle in clause?
what are the disadvantages of hierarchial database over RDBMS?
In which dictionary table or view would you look to determine at which time a snapshot or MVIEW last successfully refreshed?
Explain constraining triggers.
how to retrieve 1st and last row of table without using group functions??
How to end the current transaction in oracle?
What are the different approaches used by Optimizer in choosing an execution plan ?
What is the function of Redo Log ?