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 maxsal , minsal, ename department wise in single query
List the types of joins used in writing subqueries?
What is a subquery in oracle?
What is schema?
41 Answers Bodhi Global Services, Cognizant, HCL,
what is grid in Oracle 10g...
You have one employee table having 3 entries emp_id, Mgr_id and salary. Mgr_id is also referencing emp_id. so now find out the emp_id which are having the second highest salary, under a particular manager.
9. Display the client name and order date for all orders using the JOIN . . . USING method.
what is difference between foreign key and reference key
in account table account type amount ac1 credit 300 ac2 debit 5000 ac3 credit 3000 ac1 debit 4000 ac3 debit 2000 ac2 credit 4000 write a query how to get sum of credit & sum of debit
How to count groups returned with the group by clause in oracle?
normally database take to refresh time 2 hours. but client asked iwant to refresh with in 5 min that same database. do you have any option in BO and Oracle? explain me briefly...kavi
What is the difference between alert log file and trace file ?