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 |
select top 3 sal from each dept?
17 Answers IBM, TCS,
Can a trigger call a stored procedure?
What is pl sql script?
what is index? : Sql dba
what is bdb (berkeleydb)? : Sql dba
What are Nested Tables? How will u delete 5 rows from Nested Tables
What is pseudo column ?
Can we use distinct and group by together?
what are pl/sql collections?
4 Answers JPMorgan Chase, Oracle,
I want to display the employees who have joined in last two months. (It should be executed randomly means If I execute the query in March it should display Jan and Feb joined employees. Same query if i execute in Feb, 2007 it should display dec, 2006 and jan 2007 joined employees.
Explain what is an index?
Explain what is a database?
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)