From the course: SQL: Data Reporting and Analysis

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Use functions

Use functions

- [Instructor] Now we're going to look at functions. You may be familiar with functions already from Visual Basic or JavaScript but if you've never used a programming language, you've probably used a function in Excel. So if you've typed in something like equals sum and then you've given a range of cells and you've hit enter, you've been using a function. And Excel will go off and count up all the values in the range of cells and return you a value. That's what functions do, typically. You give them an input and they calculate some sort of output along rules that you specify and return you with usually a number or a text or a date. So what they don't do is they don't run off and edit data. They don't delete rows of data. You give them an input and they calculate an output for you. You can see from the breadcrumb bar that we are at the top level of the sakila database and we have functions, procedures, tables, and views.…

Contents