PC Review


Reply
Thread Tools Rate Thread

How to dertiminate

 
 
ad
Guest
Posts: n/a
 
      20th Nov 2005
I want to create a Stored Procedure with program.
If the Stored Procedure exist, I want to alter it.
How can I do that?


 
Reply With Quote
 
 
 
 
luxspes
Guest
Posts: n/a
 
      20th Nov 2005
ad wrote:
> I want to create a Stored Procedure with program.
> If the Stored Procedure exist, I want to alter it.
> How can I do that?
>
>

To delete an stored procedur (only if exists):

IF EXISTS (SELECT * FROM sys.objects WHERE object_id =
OBJECT_ID(N'[dbo].[PROCEDURENAME]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[PROCEDURENAME]

To alter it:
ALTER PROCEDURE PROCEDURENAME.... (and then the new body for the procedure)

hope it helps...
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to dertiminate how many connecitons ad Microsoft ADO .NET 5 21st Nov 2005 11:22 PM
How to dertiminate if a sting in the keys of a hashtable ad Microsoft C# .NET 5 16th Nov 2005 11:58 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:35 PM.