From the course: Microsoft SQL Server 2016 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Built-in functions

Built-in functions - SQL Server Tutorial

From the course: Microsoft SQL Server 2016 Essential Training

Start my 1-month free trial

Built-in functions

- [Instructor] In this section, we're going to talk about another aspect of the programmability features in SQL Server 2016. Now we're talking about functions. Functions are small pieces of code we can put into our SELECT statements to perform some calculation on one of the columns we're working with. If we open up Programmability then open up Functions then open up System Functions, we'll see several categories of different built-in functions that are automatically included with SQL Server 2016. If we look at some of these, for example, Mathematical Functions, we see different functions for working with trigonometry, working with logarithms and working with exponents. There's quite a number of these built-in functions. In my opinion, the most useful ones are MAX for finding the maximum value in a column, MIN for finding the minimum value in a column, and AVG for finding the average value of a column. So I've staged some code that will demonstrate this for us in the example files. So…

Contents