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
Is sqlite thread safe?
Why truncate is used in sql?
What is the need of merge statement?
Explain the purpose of %type and %rowtype data types with the example?
What is cascade in sql?
What is %type in sql?
what are the maximum number of rows that can be constructed by inserting rows directly in value list? : Transact sql
Why use subqueries instead of joins?
what is sp_pkeys? : Transact sql
How many types of sql are there?
Explain mutating table error.
What is date functions?
What are different types of statements supported by sql?
Write an sql query to select all records from the table?
what are the different functions in sorting an array? : Sql dba