This document provides a complete reference for Microsoft SQL Server's Transact-SQL (T-SQL) Stored Procedures and User-Defined Functions (UDFs).
Both are pre-compiled sets of T-SQL statements stored in the database. They promote code reuse, security, and performance. However, they serve different purposes.