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 can I introduce multiple conditions in like operator?
How to list all user accounts in oracle?
What do you mean by merge in oracle and how can you merge two tables?
How to write a query with an inner join in oracle?
What is a directory object?
How to assign values to data fields in record variables?
Do you know about aggregate functions? What is row num function? Can it be used all databases?
1 Answers Bravura Solutions, Cap Gemini,
What would you use to improve performance on an insert statement that places millions of rows into that table?
What is instant client oracle?
Explain what are synonyms used for?
Respected sir, Please send me technical questions related to oracle apps..
what is the difference between UNION AND UNIONALL