DROP { PROC | PROCEDURE } { [ schema_name. ] procedure } [ ,...n ]
Contoh:
- Menghapus sebuah stored procedure bernama spGetData dengan schema dbo:
DROP PROCEDURE dbo.spGetData - Menghapus beberapa (banyak) stored procedure, sebagai contoh 3 buah stored procedure bernama spGetData1, spGetData2, dan spGetData3 dengan schema dbo:
DROP PROCEDURE dbo.spGetData1, dbo.spGetData2, dbo.spGetData3
IF EXISTS (select * from dbo.sysobjects
where id = object_id(N'[dbo].[NAMASTOREDPROCEDURE]')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[NAMASTOREDPROCEDURE] GO
Click here if you like this article.
0 Comments