Cách 1:
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[MyProc]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[MyProc]
Cách 2:
IF (SELECT OBJECT_ID('dbo.MyProc')
) IS NOT NULL
DROP PROCEDURE dbo.MyProc ;
07/06/2013
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment