sandeep tiwari


{ City } gurgaon
< Country > india
* Profession *
User No # 115825
Total Questions Posted # 0
Total Answers Posted # 2

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 1
Users Marked my Answers as Wrong # 3
Questions / { sandeep tiwari }
Questions Answers Category Views Company eMail




Answers / { sandeep tiwari }

Question { KCP, 14305 }

How can we Get the Updated Rows? ie, There is 100s of Rows i
updated the Rows who have salary 5000. then i want to select
the Updated Rows. How can we achieve it?


Answer

We can achieve this w/o using any Trigger also.
For this result you just need to put your update statement inside this below block


begin
----Your udate statement
dbms_output.put_line(sql%rowcount);
end;

Is This Answer Correct ?    1 Yes 3 No

Question { MasterCard, 3258 }

if i am using dml statement in function.
then i am writing select statement what was the output


Answer

We can perform DML operation in function but we can not Query that function in select statement.
But if you want to query it any how from select stmnt then you have to use Pragma_autonomous transaction .

create or replace function f2 return date as
Pragma Autonomous_Transaction;

begin

insert into Tab values(sysdate);
commit;
return sysdate-1;


end ;

Is This Answer Correct ?    0 Yes 0 No