sales persons should always receive commission of 100 at
least. employees who r not sales persons should never
receive commission.(Triggers)



sales persons should always receive commission of 100 at least. employees who r not sales persons ..

Answer / narenkumar reddy

create or replace
trigger trigger_name
before update on emp
for each row
begin
if job<>'salesman' then
raise_application_error(-20001,'should never receive the
commission')
end if;
end;

Is This Answer Correct ?    6 Yes 13 No

Post New Answer

More SQL PLSQL Interview Questions

What is date functions?

0 Answers  


What is a relationship and what are they?

0 Answers  


What is coalesce in sql?

0 Answers  


what is sql profiler

2 Answers   Fidelity,


How do I save a stored procedure?

0 Answers  






What is left inner join in sql?

0 Answers  


What are Global Temporary tables

3 Answers   IBM, TCS,


Explain the purpose of %type and %rowtype data types?

0 Answers  


What will be the output for the below Query Select 'High' from dual where null = null;

12 Answers   Infosys, Satyam,


HOW TO TUNE ORACLE SQL QUERIES GIVE ME STEP BY SREP

1 Answers   TCS,


What is difference between nchar and nvarchar?

0 Answers  


If the base table structure is changed what will happen to join index????

2 Answers  


Categories