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...

Can i use Commit inside the Trigger? Suppose i use commit
what will be happy (it's complied /executed/work)

Answer Posted / saraswathi muthuraman

Trigger will be compiled. while execution r error will occur.
To avoid this you can use PRAGMA autonomus_transaction

example :

create or replace trigger emp_test_trig
after update on emp_test
for each row
declare
PRAGMA autonomus_transaction;
begin

insert into dep_test values(100,:new.emp_id);
commit;
end;
/

Is This Answer Correct ?    18 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a primary key called that is made up of more than one field?

1339


Is ms sql is free?

1015


What is field delimiter?

1040


Is join and inner join the same?

998


Why do we use triggers?

963


Can primary key be changed?

901


What is the difference between a primary key and a clustered index?

980


Why is sql important?

1095


what are the advantages and disadvantages of views in a database? : Sql dba

1034


what is the difference between inner and outer join? Explain with example. : Sql dba

1018


Is sql a oracle?

964


What is a procedure in pl sql?

1204


Is sql a backend?

1007


Which constraints we can use while creating database in sql?

1066


How to use sql statements in pl/sql?

1110