Reputation: 2470
I am a newbie to PL/SQL. This is the block I executed :
SET SERVEROUTPUT ON;
CREATE OR REPLACE PROCEDURE DoctorandNurse (id number, name varchar2, dno number, timings varchar2, contact number, gender char, email varchar2, salary number, doj date, post varchar2) AS
salary_exception EXCEPTION;
BEGIN
IF salary >= 2500000 THEN raise salary_exception;
ELSE
insert into Doctor_Nurse values(id,name,dno,timings,contact,gender,email,salary,doj,post);
END IF;
EXCEPTION
WHEN salary_exception THEN DMS_OUTPUT.PUT_LINE('Salary should be less than or equal to Rs. 25,00,000.');
END;
The compiler reported that the procedure was created with compilation error. What is the error exactly. Please ask for additional information if required.
Upvotes: 0
Views: 280
Reputation: 101
If you're using SQL*Plus, the following will work:
SQL> sho err
Not sure about the rest of clients, but most should support this syntax.
Upvotes: 3