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

How to use sql statements in pl/sql?

1122


Why truncate is used in sql?

1006


why does the selected column have to be in the group by clause or part of an aggregate function? : Sql dba

1112


How do you remove duplicates without using distinct in sql?

977


What is package in pl sql with an examples?

1036


Explain the update statement in sql

994


How to run sql functions in pl/sql?

1057


Do stored procedures prevent sql injection?

968


The in operator may be used if you know the exact value you want to return for at least one of the columns.

1134


How does sql*loader handles newline characters in a record? : aql loader

1046


what are the different tables present in mysql, which type of table is generated when we are creating a table in the following syntax: create table employee (eno int(2),ename varchar(10)) ? : Sql dba

1039


How do you pronounce sql?

1014


Explain what is a field in a database and record in a database?

1097


What action do you have to perform before retrieving data from the next result set of a stored procedure ?

2571


What is the purpose of the partition table?

1049