create or replace procedure ppp(v1 INTEGER) as DECLARE begin end; /
Then I saved the file and entered / at prompt. Then it gave me this warning: Procedure created with compilation errors. Please help!
DECLARE is not necessary when CREATING a stored procedure. DECLARE is only necessary for anonymous PL/SQL block.
So you should write:
CREATE OR REPLACE PROCEDURE PPP(vi INTEGER) IS BEGIN Null; -- Just to get PPP compiled -- Write your statements here. END;
Secondly, you should try to create your procedures in a file (say ppp.sql) and from SQL*Plus prompt execute the file like this.
Please make sure to include the / slash in your file.
If you still get errors, make sure to type SHOW ERRORS so you can debug.
Dig Deeper on Using Oracle PL-SQL
Related Q&A from Azim Fahmi
There are several ways to back up a database, including schema, table and full exports, as well as hot and cold backups. Here are descriptions of ... Continue Reading