SHE SHE - 1 year ago 71
SQL Question

Create stored procedure error in oracle

I create a extremely basic stored procedure but oracle toad always shows "Warning: compiled but with compilation errors".

Here is the code:

CREATE OR REPLACE PROCEDURE update_history (
tab1_name IN VARCHAR2

)
AS

BEGIN

END;

Answer Source

Oracle does not handle the empty block; so you can simply add a NULL statement:

CREATE OR REPLACE PROCEDURE update_history (
   tab1_name IN VARCHAR2
   )
AS    
BEGIN
    null;
END;