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 |
Give the Types of modules in a form?
Can we create more than one constraint to column ?
Which dictionary view(s) would you first look at to understand or get a high-level idea of a given Advanced Replication environment?
What are the ways tablespaces can be managed and how do they differ?
what is the use of composite key constraint?
without using count(*) and rownum how can we count total record in a table
There are three tables : E : EID,ENAME D : DID,DNAME empdept : eid, did select the employees who doesn't belong to any dep
Why is oracle so popular?
How to create a temporary table in oracle?
Without giving condition how to retrieve the unmatched records from table.
What privilege is needed for a user to query tables in another schema?
what are different types of locks?