Book Image

SQL Server 2014 Development Essentials

By : Basit A. Masood-Al-Farooq
Book Image

SQL Server 2014 Development Essentials

By: Basit A. Masood-Al-Farooq

Overview of this book

Table of Contents (14 chapters)
SQL Server 2014 Development Essentials
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Using T-SQL functions in the query


As mentioned earlier, we can also use the functions in your SELECT statements. SQL Server 2014 comes with many built-in functions (also known as system functions), and also lets you create user-defined functions. The functions are either deterministic or nondeterministic. The deterministic functions return the same value every time, while nondeterministic functions might return different values each time based on the values of their specified input parameters. The SQL Server 2014 built-in functions belong to one of the following categories:

  • Aggregate functions

  • Configuration functions

  • Cursor functions

  • Date and time functions

  • Mathematical functions

  • Metadata functions

  • Other functions

  • Rowset functions

  • Security functions

  • String functions

  • System statistical functions

Aggregate functions

Aggregate functions operate on a group of rows and return a single summarizing value. The SQL Server 2014 aggregate functions include AVG, MIN, MAX, SUM, CHECKSUM_AGG, COUNT, COUNT_BIG, STDEV...