sql server - Drop multple procedures (SQL2005) -


I'm curious that I can leave many processes using simple "%"? Like:

DROP constantName%

When I use Drop in Management Studio, it seems that:

  / **** ** Object: Stored Precredder [DBO]. [X] Script Date: 02/02/2010 09:36:25 ****** / If Existing (choose from * sys.objects WHERE object_id = OBJECT_ID (N '[DBO]]. [X]') And type (N'P ', N'PC')) drop process [DBO]. [X]  

Why am I seeing the object ID except this special item? Thank you

The database object identification number of schema-scod object returns in your code checking it inside an existing one , So that it will only delete the stored process when it is present in the database.

You may just be drop process process_name , but if you do not have the process available, you can get an error.

Tables, view, stored process etc. All have an OBJEIDID key identifier.

I do not think you can leave many stored procedures using a preference . (Although I am not 100% fixed on that)


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -