if i am using dml statement in function.
then i am writing select statement what was the output
Answers were Sorted based on User's Feedback
Answer / jayashree
DML cant be performed in Function. There would be no change.
| Is This Answer Correct ? | 3 Yes | 3 No |
Answer / sandeeptiwari1111@gmail.com
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 |
various types of hints and their usage
What is backup in Oracle?
How to use "in" parameter properly?
Explain database link?
Whats the benefit of dbms_stats over analyze?
What would you use to improve performance on an insert statement that places millions of rows into that table?
What are the oracle differences between nvl and coalesce
write a query that displays every Friday in a year with date?
How to add a new column to an existing table with a default value?
How to view the dropped tables in your recycle bin?
Is there any way to find out when one specific table/view/M-view is used last time. i.e. when one specific object is used in any SELECT statement.
Please explain compound trigger in oracle?