USE myDatabase //Database Name
GOdeclare @procName sysname
declare someCursor cursor for select name from sysobjects where type = 'P' and objectproperty(id, 'IsMSShipped') = 0open someCursor
fetch next from someCursor into @procName
while @@FETCH_STATUS = while @@FETCH_STATUS = while @@FETCH_STATUS = 0begin exec('drop proc ' + @procName)
fetch next from someCursor into @procName
endclose someCursor
deallocate someCursor
go
No comments:
Post a Comment