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 are group functions in oracle?
why dont we assign not null constraint as table level constraint.
1) Does oracle have any table which contain all the exceptions and it's code internally?
What is oracle join syntax?
Explain integrity constraint?
How to change user password in oracle?
What are the attributes of the cursor?
Can a formula column referred to columns in higher group ?
If youre unsure in which script a sys or system-owned object is created, but you know its in a script from a specific directory, what UNIX command from that directory structure can you run to find your answer?
What do database buffers contain?
How to create a stored function in oracle?
How to pass parameters to procedures in oracle?
Will you be able to store pictures in the database?explain.
 How to use an oracle sequence generator in a mapping?
What is a lookup table in oracle?