How to Create a procedure for Delete record by ID ?

Posted by  Sanat Shukla
 518  View(s)
Ratings:
Rate this:


  1. Re: How to Create a procedure for Delete record by ID ?

    //----------Delete Record By ID---------//
    
    CREATE PROC ContactDeleteByID
    
    @ContactID int
    AS
    Begin
     Select * from Contact
     where ContactID=@ContactID
    END
    NOTE:-
    1). Don’t make space between parameter name Like :
    Student Name -------- (wrong syntax).
    Student_Name or StudentName -------- (Correct Syntex).
    2). When You need to update Stored Procedure then you use ALTER keyword place on CREATE.
    And execute procedure after the update.

Answer