PL/SQL Procedure

What is the difference in CREATE or [REPLACE] Procedure and to drop a procedure and create it again? What does REPLACE do, Does it drop the existing one and create the new one with same name?

Questions by Pallavi_2507

Showing Answers 1 - 4 of 4 Answers

krishsidd

  • Nov 15th, 2010
 

Replace just recompiles the if the procedure is already existing with the same session settings. However Drop will drop the object from database and then you may need to recreate using create clause as required.

z_ashwini

  • Jan 13th, 2012
 

Create procedure_name will create a procedure. If there is an already existing procedure with the same name it will return an error.

Create or replace procedure procedure_name will create an procedure if the same procedure name is non existing else it it overwrite already existing procedure....

  Was this answer useful?  Yes

souvik

  • Nov 16th, 2014
 

If you drop the procedure, then all the privileges are gone which you will have to give again while creating the program. But CREATE OR [REPLACE] command will keep the privileges intact.

  Was this answer useful?  Yes

Abhijit Musale

  • Mar 23rd, 2015
 

PLSQL objects and views can be replaced if pre-exists using REPLACE keyword.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions