1- Does DB2 have Extended Properties for objects like MS SQL has?
Any idea if it exists in Oracle?
2- Oracle has CREATE OR REPLACE PROCEDURE, is there
an equivalent in DB2?
I would like to know if it's simple to add a condition to delete before
the creation of a function or a stored procedure. For example in
Microsoft SQL the code below will check and drop the stored
procedure procTEST if it exists.
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[procTEST]') and
OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[procTEST]
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
CREATE PROCEDURE dbo.procTEST
@ID INTEGER
AS
DELETE
FROM TableTEST
WHERE ID = @ID
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
3- On the same topic what is the proper code to write an ALTER
PROCEDURE? For example if i want to Alter the above
procTest procedure by changing the
WHERE ID = @ID
to
WHERE ID = 1
I am getting an error why i simply change the word CREATE to
ALTER and try to execute the code.
4- In MS SQL there is no PACKAGE like i see DB2 and ORACLE have.
What is it and how would i know if i need to use it when i am converting
MS SQL procedures to DB2?
Thank you