Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Can we call procedure inside function in oracle?

1096


what is the difference between data migration and production migration.

2346


How to define a cusotmer as a supplier in ORACLE R12

2232


What is bulk load in oracle?

1070


What is the quickest way to fetch the data from a table?

1058


How to apply filtering criteria at group level in oracle?

1042


How to handle a single quote in oracle sql?

1053


Can we convert a date to char in oracle and if so, what would be the syntax?

1015


How do we display rows from the table without duplicates?

972


Is a rollback possible to any savepoint?

1096


What is user managed backup in Oracle?

1146


How to define default values for formal parameters?

1044


How to concatenate two text values in oracle?

1114


What operating systems are supported by oracle database 10g xe?

1034


Why cursor variables are easier to use than cursors?

1094