By: Dallas Snider | Updated: 2014-09-11 | Comments (2) | Related: > Functions User Defined UDF
Problem / Solution
There are several functions that are included with Excel that are not included with SQL Server. One of these functions is the RANDBETWEEN function. This function allows you to return a random number between a lower and upper bound values. In this video tip, Dallas Snider will show how you can create your own T-SQL function to mimic the Excel RANDBETWEEN function.
Key Learning Items
- Examples of the RANDBETWEEN function
- Creating a T-SQL RANDBETWEEN function
- Issues using the T-SQL RAND() function in a UDF and how to get around the it
Companion Tip
About the author
This author pledges the content of this article is based on professional experience and not AI generated.
View all my tips
Article Last Updated: 2014-09-11