SHE SHE - 4 months ago 11
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

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;
Comments