Viewers: in countries Watching now:
This course investigates several key database-programming concepts: triggers, stored procedures, functions, and .NET CLR (Common Language Runtime) assemblies. Author Martin Guidry shows how to combine these techniques and create a high-quality database using Microsoft SQL Server 2012. The course also covers real-world uses of the INSERT, UPDATE, and DELETE procedures, and how to build a basic web form to connect to your database.
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.
There are currently no FAQs about SQL Server: Triggers, Stored Procedures, and Functions.
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.