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

can a table has a column that has only view data and in other columns we can change data?

2 Answers   Secon,


what are bitmap indexes? How does they work?

0 Answers  


What are the uses of synonyms?

0 Answers  


t1 col1 col2 nishi 5000 lucky 6700 akash 7000 i want that a query that when i insert 7000 it will show me data already present and data will not insert. if data is not present it will insert.

2 Answers   MasterCard,


What is a subquery in oracle?

0 Answers  


What is connection pooling in oracle?

0 Answers  


12. Display the client name in upper case only and in lower case only.

1 Answers   Wipro,


What are the values that can be specified for OPTIMIZER MODE Parameter ?

1 Answers  


you are a universe designer and report developer in BO, what type of information you gather from client?Briefly explain plz

0 Answers   iFlex,


i want department wise maxmum salary and empolyee name

9 Answers  


I have a table that log salary-increase-process have fields: autoid, old_salary, acctno and table EMP: acctno, name, salary I want to list count increase-salary of employees, each have old_salary, new_salary. Help me with SELECT statement, please!

1 Answers  


difference between imlicit cursor and explicit cursor ?

5 Answers   Cap Gemini,


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)