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 difference between stored procedures and application procedures?

0 Answers  


source destination distance chennai bangalore 500 bangalore chennai 500 hyd delhi 1000 delhi hyd 1000 bangalore hyd 800 Here chennai to bangalore and bangalore to chennai is same distance. and hyd and delhi also same criteria. Based on the distance i want to display only one row using sql query?

4 Answers   JPMorgan Chase,


what is the difference between mysql_fetch_array and mysql_fetch_object? : Sql dba

0 Answers  


Let us suppose we have a table with structure in order empno empname empdesig empcountry and now i want to re-organize the columns of this table to empno empdesig empname empcountry how can i do this with queries ? assume that table contains the data.

3 Answers  


what are the differences between require and include, include_once and require_once? : Sql dba

0 Answers  






How do you delete a table?

0 Answers  


Which data dictionary views have the information on the triggers that are available in the database?

0 Answers  


What is mutating table error?

0 Answers  


Whate is use of MOD function in pl/sql.

3 Answers   Oracle,


what are the different tables present in mysql, which type of table is generated when we are creating a table in the following syntax: create table employee (eno int(2),ename varchar(10)) ? : Sql dba

0 Answers  


What is set transaction?

0 Answers  


Does sql support programming?

0 Answers  


Categories