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 rownum?
What are transaction and its controls?
Is sql a microsoft product?
Is there any problem if we use commit repeatedly after each dml statement in a plsq procedure ? (eg. there are 10 update stmt and using 10 commit stmt after each update stmt)
What is the usage of sql functions?
How do you retrieve the last N records from a table?
What is a trigger in sql?
What is auto increment in sql?
what is oracle sql,pl/sql with interfaces
What are two virtual tables available during database trigger execution ?
Why do we use %rowtype & %type in plsql?
How many types of sql are there?
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)