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 the difference between delete and truncate commands?

0 Answers  


Why are sql stored procedures used?

0 Answers  


what are the advantages of primary key over unique+notnull

7 Answers   Consultancy, LGS, Oracle,


What is a primary key called that is made up of more than one field?

0 Answers  


Why do you partition data?

0 Answers  






Can you join a table to itself?

0 Answers  


What is materialised View?

2 Answers   IBM,


What is a mutating table

5 Answers   TCS, Tech Mahindra,


What is difference between joins and union?

0 Answers  


What is native sql query?

0 Answers  


what is sql in mysql? : Sql dba

0 Answers  


IF EMP HAS 2 ROWS,DEPT HAS 4 ROWS.WHATS THE RESULT OF SELECT * FROM EMP,DEPT;

1 Answers  


Categories