A stored procedure is nothing more than prepared SQL code that you save so you can reuse the code over and over again.  So if you think about a query that you write over and over again, instead of having to write that query each time you would save it as a stored procedure and then just call the stored procedure to execute the SQL code that you saved as part of the stored procedure.

     CREATE PROCEDURE dbo.insert_student
    @Stud_name    varchar(MAX),
    @Stud_roll_no varchar(MAX)
AS
   insert into student_data
   (
       Stud_name ,
       Stud_roll_no
    )
values
    (
         @Stud_name ,
         @Stud_roll_no
     )
       RETURN
    

Comments ( 0 )