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

Which environment variables are absolutely critical in order to run the OUI?

0 Answers  


1.how to extract the second highest salary from emp table having sal as a column which contains the salary of all employee of an organisation.

6 Answers  


What is the difference between sharding and partitioning?

0 Answers  


what is insert all statement in sql

2 Answers   CGI, TCS,


what are stored procedures?

7 Answers   TCS, Wells Fargo,


What is the dynamic sql in oracle?

0 Answers  


difference between imlicit cursor and explicit cursor ?

5 Answers   Cap Gemini,


What are the limitations of check constraint?

0 Answers  


How can I create database in oracle?

0 Answers  


Explain about integrity constraint?

0 Answers  


what is the use of ondelete cascade?

3 Answers  


What are the different types of trigger and explain its various uses and functions?

0 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)