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 shutdown your 10g xe server?
How to insert a new row into a table in oracle?
Explain the use of full option in exp command.
How to estimate disk space needed for an export job?
Explain oracle instance.
Explain the use of online redo log files in oracle.
cursor attributes are %isopen ,%notfound,%found,%rowcount but is any attributes there other than these? please tell me asap ..
What is a cluster?
Please explan Why static query is more faster than dynamic query ?
What is the difference between truncate & delete command?
What happens if the imported table already exists?
Whatz the main diff between Subquery and a Join
14 Answers Oracle, Zeta Interactive,