liveBook · Manning

Stored procedure

A stored procedure is a named executable routine stored in and invoked by a database management system to perform database operations.

How 4 Manning books explain it

Snowflake Data Engineering

A stored procedure is a named, executable program stored in a database and invoked to perform data or control operations.

How it is used
Encapsulates pipeline transformations so tasks or orchestration mechanisms can invoke a load through one procedure call.
How deep it goes
Builds a Snowflake Scripting procedure from declaration through CALL and RETURN, then extends its role to exception handling and logging.
Examples
Demonstrates LOAD_CUSTOMER_ORDERS merging staged bakery orders and READ_EMAIL_PROC extracting structured order information from customer emails.
What you can do after
Apply it via Snowflake Scripting to centralize a MERGE load, invoke it with CALL, and return affected-row status.

Read how Snowflake Data Engineering explains stored procedure →

Learn SQL in a Month of Lunches

A stored procedure is a named sequence of database statements stored on a database system for execution as a unit.

How it is used
Reuses named SQL tasks, including multi-query operations, for users with permission to execute them.
How deep it goes
Defines creation, calls, parameters, NULL handling, maintenance cautions, and conditional writes; defers broader procedural capabilities.
Examples
Uses GetTitleCategory, GetOrder, AddPromotion, and InsertAnnualPayment to retrieve, filter, insert, and process data.
What you can do after
Build it from scratch by creating and calling parameterized procedures that retrieve or conditionally write database data.

Read how Learn SQL in a Month of Lunches explains stored procedure →

100 SQL Server Mistakes and How to Avoid Them

A stored procedure is a named, executable routine stored in a database and capable of accepting parameters and performing database operations.

How it is used
Encapsulates sales-order creation while illustrating why database routines need graceful error handling.
How deep it goes
Works through a parameterized routine, transaction failures, TRY..CATCH, custom errors, and logging rather than procedure design broadly.
Examples
Uses dbo.InsertSalesOrder, a renamed SalesOrderDetails table, invalid product IDs, duplicate orders, and an ErrorLog table.
What you can do after
Diagnose/debug failed procedures by checking transaction counts, interpreting constraint errors, and adding handling or logging.

Read how 100 SQL Server Mistakes and How to Avoid Them explains stored procedure →

AI for Everyday IT

A stored procedure is a named, executable program stored in a database and invoked to perform database operations.

How it is used
Uses stored procedures to analyze database performance and automate reusable administration tasks.
How deep it goes
Explains performance metrics and parameterized administration workflows, but does not develop procedure syntax generally.
Examples
Uses a procedure-statistics query and a parameterized procedure for moving database data and log files.
What you can do after
Build it from scratch with parameters, validation, connection handling, file movement, and reattachment logic.

Read how AI for Everyday IT explains stored procedure →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.