What is a Stored Procedure?

Stored Procedure -

A "Stored Procedure" is a named group of pre-compiled SQL statements which are created and stored in the server database.

  • A Stored Procedure can be reused.
  • Stored procedures accept the input parameters.

Syntax to Create a Stored Procedure in SQL server -

CREATE PROCEDURE ProcedureName
AS
BEGIN

---------------
SQL Query
---------------
END

Syntax to Call a Stored Procedure in SQL server -

EXEC ProcedureName
Protected by Copyscape Plagiarism Check