Video on how to create your own RANDBETWEEN function for SQL Server
By: Dallas Snider | Comments (2) | Related: More > 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

View all my tips