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 |
Why does sql need a server?
four procedures is are there should i write their in a package
Why use subqueries instead of joins?
how do you login to mysql using unix shell? : Sql dba
What is pl/sql language case sensitive?
How will you a activate/deactivate integrity constraints?
how to get @@error and @@rowcount at the same time? : Sql dba
how can we submit a form without a submit button? : Sql dba
Can we use two order by clause in query?
Is pl sql a programming language?
explain normalization concept? : Sql dba
I need to write a simple query,which one is better select statement or stored procedure?and why?
Oracle (3253)
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)