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 get execution path reports on query statements?
I have a database backup file in .db (ext) form how to conver it into .dmp (ext.) for oracle database
What is Java Pool in Oracle?
How will you identify oracle database software release?
What is the difference between hot backup and cold backup in oracle?
What is system tablespace?
SQLERRM is a a. Constraint b. Pre Defined Exception c. Pseduocolumn d. Constant e. None of Above.
How to handle a single quote in oracle sql?
Explain the use of indexes option in exp command.
What spfile/init.ora file parameter exists to force the CBO to make the execution path of a given statement use an index, even if the index scan may appear to be calculated as more costly?
List the various oracle database objects?
What is oracle latest version?