Chapter 30. User-Defined Functions

by Ray Rankins

IN THIS CHAPTER

  • Why Use User-Defined Functions?

  • Types of Functions

  • Creating and Managing Functions

  • System-Wide Table Valued Functions

  • Rewriting Stored Procedures as Functions

SQL Server provides a number of predefined functions built in to Transact-SQL. (These functions are covered in more depth in Chapter 26, “Using Transact-SQL in SQL Server 2000.”) The supplied functions help extend the capabilities of Transact-SQL, providing the ability to perform string manipulation, mathematical calculations, datatype conversions, and so on, within your T-SQL code. Although SQL Server provides a pretty extensive set of functions, there are always times when you wish you had a function that is not provided. You ...

Get Microsoft® SQL Server™ 2000 Unleashed, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.