Stored Procedures in T-SQL

Stored Procedures in T-SQL: Creating Stored Procedures, Calling a Stored Procedure from C#.

Updated

  1. Creating Stored Procedures (Journeyman): A stored procedure is a named, saved batch of SQL that takes parameters. Create one with CREATE OR ALTER PROCEDURE, give parameters defaults, and run it with EXEC.
  2. Calling a Stored Procedure from C# (Journeyman): In ADO.NET, put the procedure's name in a SqlCommand, set its CommandType to StoredProcedure, and add each parameter by name. Then read the results as from any query.