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 to change sql*plus system settings?

544


Is primary key clustered or nonclustered?

568


Which is better join or subquery?

608


what are the properties and different types of sub-queries? : Sql dba

507


What are tables and fields?

595






What is an example of translating a date into julian format?

582


how to create a test table in your mysql server? : Sql dba

500


How show all rows in sql?

616


What is a subquery in sql?

511


Which type of cursor is used to execute the dml statement?

534


Which join is default?

522


Is stored procedure faster than query?

566


I need a function for a train ticket reservation please answer it thanks in advance

565


what is index? : Sql dba

558


Is truncate ddl or dml?

545