Hi all,
I am MS SQL developer and new to Oracle. I have a question w.r.t. stored procedures/functions.
Before i create a stored procedure/function, i want to check if it exists and if exists then drop and recreate it.
T-SQL syntax:
The T-SQL syntax would be some thing like the below.
IF EXISTS(SELECT * FROM SYS.OBJECTS WHERE Name = 'ProcName' AND Type = 'P')
DROP PROCEDURE ProcName
GO
CREATE PROCEDURE PROCNAME(@VAR1 DATATYPE,@VAR2 DATATYPE)
AS
BEGIN
SQL CODE
END
Could any of you let me know how this can be implemented in oracle?