Skip to main content
  • 2708 Accesses

Abstract

Functions were introduced in SQL Server 2000 and made an immediate impact. Functions allow you to wrap up pieces of code you use all the time into a nice, compact, reusable package. In this chapter, we’ll find out what types of function SQL Server allows us to create, why functions are useful, and how we can improve our code with functions. We’ll also see some of the system functions SQL Server provides. By the end of this chapter, we’ll know all about scalar functions, and we’ll be ready to talk about table-valued functions (TVFs) in Chapter 17. We’ll be half-functional!

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Mike McQuillan

About this chapter

Cite this chapter

McQuillan, M. (2015). Functions. In: Introducing SQL Server. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-1419-0_16

Download citation

Publish with us

Policies and ethics