0

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.

2
  • Please issue the command, show errors, and provide the results. Commented Nov 29, 2017 at 18:31
  • This is the error as i said before : Procedure created with compilation error. Nothing more, nothing less. Commented Nov 29, 2017 at 18:32

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

1 Comment

This fixed the problem once I saw the error. The error was a syntactical error. DBMS._OUTPUT.PUT_LINE. I missed the B.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.