Chapter 13. Built-in scalar functions

After completing this chapter, you will be able to

  • Return and manipulate date and time values using date and time functions.

  • Convert data with the CAST and CONVERT functions.

  • Manipulate string values.

  • Add logic to T-SQL statements using built-in functions.

Microsoft SQL Server boasts a plethora of built-in scalar functions whose purposes and results vary depending on type and use. Within SQL Server, scalar functions are grouped into 12 categories. Of those, we will discuss four categories in this chapter: date and time, conversion, string, and logical. Several new scalar functions have been added to SQL Server 2012.

Note

If you would like to explore all the available built-in scalar functions, refer to the “Built-in ...

Get Microsoft® SQL Server® 2012 Step by Step 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.