• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 61
  • Last Modified:

how to recreate a stored procedure if it already exists?

In Sybase sql how do I check if a stored procedure exists?
If the procedure exists I need to recreate it.

If it does not exists I need to also create it.
0
brgdotnet
Asked:
brgdotnet
1 Solution
 
slightwv (䄆 Netminder) Commented:
use CREATE OR REPLACE procedure procname ...

The docs are always a great place to start:
Specifying OR REPLACE (CREATE OR REPLACE PROCEDURE) creates a new procedure, or replaces an existing procedure with the same name. This clause changes the definition of the procedure, but preserves existing permissions. An error is returned if you attempt to replace a procedure that is already in use.
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc00801.1520/html/iqrefso/CIHHBAHB.htm
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now