From the course: SQL Server 2014 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 - SQL Server Tutorial
From the course: SQL Server 2014 Essential Training
Built-in functions
- So now moving on in the programmability tree, under stored procedures we see functions. If we open up functions, one of the items we see is system functions. I'll open that up. And one of the items there is aggregate functions. I'll open that up. And we see some functions that already exist in the server. Some of the interesting ones are AVG, which returns the average of values. MAX, which returns the maximum value. And MIN, which returns the minimum value. And these can be very useful. We can put these right into SQL queries and get some interesting results. I've staged a query for you in your exercise files. You'll want to copy and paste all of that into a new query window. I'm again working with the table humanresources.employee and we're gonna look at some of the values of vacation hours so we are selecting the minimum vacation hours. I did that by just writing MIN, the built-in function, and then in parenthesis, vacation hours. So this should look at all of the values of…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.