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 is a primary key called that is made up of more than one field?

1286


What are the various levels of constraints?

1061


Is primary key an index?

947


What is composite data type in pl sql?

1035


Can you rollback after commit?

936


What steps server process has to take to execute an update statement?

922


What is server name sql?

1070


What is fmtonly in sql?

1010


If the application is running very slow? At what points you need to go about the database in order to improve the performance?

949


What is procedure and function?

924


What is a system versioned table?

932


What is a trigger in sql?

1158


what is view? : Sql dba

914


how many sql ddl commands are supported by 'mysql'? : Sql dba

959


What is sql and db2?

944