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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you run a query?

768


The select into statement is most often used to create backup copies of tables or for archiving records?

773


How does a covering index work?

693


what is a tablespace? : Sql dba

766


What is scalar function in sql?

706






How to use sql statements in pl/sql?

800


What is type and rowtype in pl sql?

741


What is sqlca in powerbuilder?

746


how can we submit a form without a submit button? : Sql dba

728


Can we call a function containing dml statements in a select query?

724


Show how functions and procedures are called in a pl/sql block.

767


What is a variable in sql?

725


what are the 'mysql' command line options? : Sql dba

744


What are pl/sql cursors?

730


How do I make sql search faster?

768