Updated on Kisan Patel
This tutorial will show you how to create stored procedure to delete a record from the SQL Server database?
CREATE PROCEDURE DeleteRegionDetails -- Add the parameters for the stored procedure here @RegionId int @Age smallint AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- Insert statements for procedure here Delete Region Where RegionID = @RegionId END
Notice that we have only one parameter in the above stored procedure as we need only that to find out the record having RegionId and delete it.