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 are the different sql languages?

0 Answers  


we have a package and we have grants to execute that package inside of that we have table, here we don't have privileges to this table? whether this package will execute or not?

3 Answers   TCS,


1) Synonyms 2) Co-related Subquery 3) Different Jobs in Plsql 4) Explain Plan 5) Wrap 6) Query Optimization Technique 7) Bulk Collect 8) Types of index 9) IF primary key is created then the index created ? 10) Foreign Key 11) Exception Handling 12) Difference Between Delete and Trunc 13) Procedure Overloading 14) Grant Revoke 15) Procedure Argument types. 16) Functions. 17) Joins

0 Answers   CTS,


What is execute immediate?

0 Answers  


Begin For j in 4403201000 .. 4403202000 Loop If mod (j, 100) = 0 then Dbms_output.put_line (j); End if; End loop; End; what will be the output of this question

7 Answers   TCS,






what is a database transaction? : Sql dba

0 Answers  


What sql does db2 use?

0 Answers  


What does the argument [or replace] do?

0 Answers  


Define tables and fields in a database

0 Answers  


Write a sql query to find the names of employees that begin with ‘a’?

0 Answers  


How many triggers can be applied to a table?

0 Answers  


What is the maximum rows in csv?

0 Answers  


Categories