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

Explain the commit statement.

1136


Which query operators in sql is used for pattern matching?

940


How to start the command-line sql*plus?

1040


How do I upgrade sql?

986


what is union, minus and interact commands? : Sql dba

1164


What is the use of pl/sql table?

1043


How do you declare a user-defined exception?

1004


Why is %isopen always false for an implicit cursor?

1083


How do I run pl sql in sql developer?

1099


Which command is used to delete a trigger?

1306


Can you inner join the same table?

975


Explain 3 basic parts of a trigger.

1296


how to escape special characters in sql statements? : Sql dba

1015


How to run sql functions in pl/sql?

1038


How many types of primary keys are there?

1017