if i am using dml statement in function.
then i am writing select statement what was the output
Answer Posted / 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 |
Post New Answer View All Answers
What is archive log in Oracle?
Can multiple columns be used in group by in oracle?
Explain constraining triggers.
What is a snapshot log?
What do the 9i dbms_standard.sql_txt() and dbms_standard.sql_text() procedures do?
How to rename a tablespace in oracle?
Can you drop an index associated with a unique or primary key constraint?
What is an Oracle Instance?
How to assign a table row to a record variable?
 What are the oracle DML commands possible through an update strategy?
How to convert characters to dates in oracle?
What is a subquery?
How to add a new column to an existing table in oracle?
What is the disadvantage of User defind function?
How to end the current transaction in oracle?