- SQL Queries Part 1 - Writing basic queries
- SQL Queries Part 2 - Sorting queries in SQL
- SQL Queries Part 3 - Using Criteria in Queries
- SQL Queries Part 4 - Creating Calculations in Queries
- SQL Queries Part 5 - Using CASE Statements
- SQL Queries Part 7 - Using Functions in Queries
- SQL Queries Part 8 - Calculations with Text
- SQL Queries Part 9 - Calculations with Dates
- SQL Queries Part 6 - Using Joins in Queries
- SQL Queries Part 10 - Grouping and Aggregating Data
- SQL Queries Part 11 - Subqueries
- SQL Queries Part 12 - Correlated Subqueries
- SQL Programming Part 1 - Stored Procedure Basics
- SQL Programming Part 2 - Stored Procedure Parameters
- SQL Programming Part 3 - Variables in SQL
- SQL Programming Part 4 - Output Parameters and Return Values
- SQL Programming Part 5 - IF Statements in SQL
- SQL Programming Part 6 - WHILE Loops
- SQL Programming Part 7 - User Defined Functions
- SQL Programming Part 8 - Temporary Tables
- SQL Programming Part 9 - Table variables
- SQL Programming Part 10 - Table-Valued Functions
- SQL Programming Part 12 - Cursors
- SQL Programming Part 11 - Common Table Expressions (CTEs)
- SQL Programming Part 13 - Dynamic SQL
- SQL Programming Part 14 - Transactions
- SQL Programming Part 15 - DML Triggers
- SQL Programming Part 16 - DDL Triggers
- SQL Programming Part 17 - The Pivot Operator
- SQL Programming Part 18 - Dynamic Pivot Tables
VIDEOS BY AUTHOR
VIDEOS BY YEAR
SQL videos | SQL Programming Part 7 - User Defined Functions
Posted by Andrew Gould on 31 January 2013
If you have a calculation that you frequently use in SQL queries you're probably bored of writing out the same code time after time. Why not try creating a user-defined function to save you the hassle! This video teaches you how to define your own custom functions, including how to use input parameters, how to alter a function after you've created it, and even how to use fancy programming techniques such as variables and IF statements to help structure complex sequences of calculations.
You can play this video on SQL Programming Part 7 - User Defined Functions here (see viewing hints below also).
You can increase the size of the video:
You can view the video in full screen mode as shown on the left, using the icon at the bottom right of the frame.
You can also increase the quality of the video:
You can improve the resolution of the video using another icon at the bottom right of the frame. This will slow down the connection speed, but increase the display and sound quality. This icon only becomes visible when you start playing the video.
Finally, if nothing happens when you play the video, check that you're not using IE in compatibility view.