Can we have exception part in trigger ?
Answer / kishore
yes........
create or replace trigger emp_biu
before insert or update on employee
referencing new as new old as old
for each row
begin
if nvl(:new.salary,0) >= 10000 then
raise_application_error (-20999,'Salary with
commissions should be less than 10000');
end if;
end;
/
| Is This Answer Correct ? | 15 Yes | 0 No |
What is Function based Index and which type of function we can use in Function base index. can we use aggregate,NVL function in Function based Index..
1 Answers Metric Stream, Polaris,
What is difference between rank () row_number () and dense_rank () in sql?
What are Anti joins
Interchange the value of a column Gender in a table where values are Male and Female. So, where the value is Male, it should changed to Female and Female to Male.
What is delimiter sql?
Is inner join same as self join?
How packaged procedures and functions are called from the following?
Could you please provide oca (oracle 10g) dumps for my certification ?
Can we rollback after truncate?
what is the command used to fetch first 5 characters of the string? : Sql dba
what is an execution plan? When would you use it? How would you view the execution plan? : Sql dba
Is it possible to include an insert statement on the same table to which the trigger is assigned?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)