Bonus Appendix 1

System Functions

SQL Server includes a number of “system functions,” as well as more typical functions with the product. Some of these are used often and are fairly clear right from the beginning in terms of how to use them. Others, though, are both rarer in use and more cryptic in nature.

In this appendix, I’ll try to clarify the use of most of these functions in a short, concise manner.

imageNOTE Just as an FYI, in prior releases, many system functions were often referred to as global variables. This was a misnomer, and Microsoft has attempted to fix it over the last few releases — changing the documentation to refer to them by the more proper system function name. Just keep the old terminology in mind in case any old fogies (such as myself) find themselves referring to them as globals.

The T-SQL functions available in SQL Server 2012 fall into the following categories:

  • System statistical functions
  • Aggregate functions
  • Analytic functions
  • Configuration functions
  • Conversion functions
  • Cryptographic functions
  • Cursor functions
  • Date and time functions
  • Hierarchy functions
  • Mathematical functions
  • Basic Metadata functions
  • Ranking functions
  • Rowset functions
  • Security functions
  • String functions
  • System functions
  • Text and image functions

imageNOTE In addition, there is the OVER operator, ...

Get Beginning Microsoft® SQL Server® 2012 Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.