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 |
Are stored procedures faster than queries?
How do I create a sql script?
What are wait events. Describe the wait event tables.
What is hibernate and its relation to sql?
What is the importance of sqlcode and sqlerrm?
what is an associative array with example?
I want to create synonym for table emp but in my pc it is giving insufficient previliges.I am using user scott.Please suggest me.
If you want a column to be part of the result set, after which SQL keyword does it belong? 1. SELECT 2. FROM 3. WHERE 4. GROUP BY 5. HAVING
10 Answers HCL, TCS,
i have doubt that any one tell ref cursor comes in sql pl/sql? pls clarify?
how to debugg a procedure or package using dbms_output.put_line in plsql
How to select unique records from a table?
Can we use having without group by in sql?