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



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

Answer / jayashree

DML cant be performed in Function. There would be no change.

Is This Answer Correct ?    3 Yes 3 No

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

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

Post New Answer

More Oracle General Interview Questions

How to convert a string to a date in oracle database?

0 Answers  


difference between oracle8i and oracle9i

4 Answers   NIIT,


What are the attributes that are found in a cursor?

0 Answers  


What do you mean by cdb and pdb in oracle 12c?

0 Answers  


What is the difference between substr and instr?

0 Answers  






Explain about functional dependency and its relation with table design?

0 Answers  


How do I uninstall oracle client from windows?

0 Answers  


I have my backup RMAN script called backup_rman.sh. I am on the target database. My catalog username/password is rman/rman. My catalog db is called rman. How would you run this shell script from the O/S such that it would run as a background process?

1 Answers  


Explain the different normalization forms?

0 Answers  


What is oracle database 10g express edition?

0 Answers  


What is meant by a deadlock situation?

0 Answers  


can you explain performance tunning in oracle(sql,PL/SQL)

2 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1808)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)