After update how do u know how many records got updated
Answer Posted / 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 |
Post New Answer View All Answers
Write a trigger example in oracle?
What is a trigger and what are its types?
What are operators in oracle?
what is Single Byte Overhead...?
What is the relation of a user account and a schema?
How do I know if oracle client is installed on windows?
What is java oracle used for?
HI Friends Myself Manoj,i am from bengaluru.i have 1 yr of exp in PLSQL but not upto the mark..now attending interviews but m not able to clear even 1 round..i have attended 3 interviews till today.purpose of writing this query is,i want to know the intreview topics that interviewer going to ask frequently,mainly SCENARIO based questions.IF anybody have any PLSQL projects please give it to me,it will helps me alot.Thanks for your patience.
What is a trigger oracle?
What are the predefined tablespaces in a database?
What is oracle sid?
How to view the data files in the current database?
What is data block in Oracle?
Explain oracle left join with an example?
What is an oracle tablespace?