Stored Procedure

     

     

  • We can execute below mentioned DDL commands with Procedure
  •  

     

    Syntax to Create Procedure

  • Create Proc|Procedure Procedure Name
  •  

    Syntax to Execute store procedure

  • Execute is a command used to executre stored procedure
  • EXEC Stored Procedure
  • Create & Drop Stored Procedure

     

     

     

    Create Procedure to store entire table in a Object

     

     

     

    Create Stored Procedure and store Item and Quantity columns of table

     

     

     

    Syntax to Create a Varibale in TSQL:

     

    Syntax to Create Stored Procedure using varibale:

     

     

     

     

     

     

    Query:Create Stored procedure by retrieving common records from the tables of Sales and Location, by using variables for Year and Month

     

     

    Drop StoredProcedure: