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 are the advantages of sql? Explain

1147


Does sqlite need a server?

1094


Why do we create stored procedures & functions in pl/sql and how are they different?

990


How long will it take to learn pl sql?

976


What is the difference between alter trigger and drop trigger statements?

1156


What is blind sql injection?

1162


Is microsoft sql free?

1136


What is sql trigger example?

1108


What is the need of a partition key?

1025


what is the bond code in materialized view?

3051


Does truncate free space?

1062


What is the difference between row level and statement level trigger?

1068


Can a primary key be a foreign key?

1075


Does group by remove duplicates?

1090


Is it possible to Restore a Dropped Table using Rollback Command in Oracle SQL Plus ?

1267