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 we have exception part in trigger ?

Answer Posted / kishore

yes........

create or replace trigger emp_biu
before insert or update on employee
referencing new as new old as old
for each row
begin
if nvl(:new.salary,0) >= 10000 then
raise_application_error (-20999,'Salary with
commissions should be less than 10000');
end if;
end;
/

Is This Answer Correct ?    15 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What language is oracle sql developer?

955


What is sql analyzer?

970


how would you enter characters as hex numbers? : Sql dba

953


Explain the components of sql?

1003


Can a select statement fire a trigger?

1105


Does sql require a server?

961


How we can create a table in pl/sql block. Insert records into it? Is it possible by some procedure or function? Please give example?

1004


what is bcp? When does it used? : Sql dba

946


How many columns should be in an index?

914


Where not exists in sql?

931


What are the types of join and explain each?

996


Which is faster union or join?

921


how to rename an existing table in mysql? : Sql dba

1019


Can a varchar be a primary key?

967


What is trigger explain with example?

997