I want to create a stored procedure in a Pervasive database, but only if it does not yet exist.
I found something for SQL Server:
IF NOT EXISTS (SELECT *
FROM sys.objects
WHERE type = 'P' AND OBJECT_ID = OBJECT_ID('dbo.MyProc'))
exec('CREATE PROCEDURE [dbo].[MyProc] AS BEGIN SET NOCOUNT ON; END')
GO
I found that code on this link How to check if a stored procedure exists before creating it.
So I want something really similar for Pervasive.