How to Create a procedure for Delete record by ID ?

Total Post:31

Points:219
 82  View(s)
Ratings:
Rate this:


  1. Post:281

    Points:2003
    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

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!