Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Now let's talk about some of the advantages of using functions. Functions have most of the same benefits of stored procedures. They can simplify administration and maintenance of common routines. The code is stored with the data. They do have some of the same security options as stored procedures, but people don't use these quite as commonly as they do with stored procedures. And we also have all of the performance improvements of the stored execution plan. Additionally, functions have some other benefits.
In line functions can be very easy and intuitive. A developer who is familiar with select statements can quickly adapt to a select statement written with functions rather than with typical database objects. It's just not that big of a jump to go from a mindset of not using functions to a mindset of using functions, because the code is still structured so similarly. Functions can also be a quick way to abstract some complex ideas. So something like formatting an address. Well, if you have customers from dozens of different countries that all need their address formatted different ways, we don't want our developers to spend lots and lots of time writing that code every time they need an address.
Creating a function that formats the addresses properly for whatever country can allow the developer to move past that complexity and just focus on other tasks.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 98470 Viewers
61 Video lessons · 85754 Viewers
71 Video lessons · 69656 Viewers
56 Video lessons · 101986 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.