Though it looks simple it is very difficult to generate random numbers which one can’t guess. There are many different ways to generate random values in SQL Server. I have previously blogged about it over here where I have demonstrated five different methods to generate random values in SQL Server.
In this sixty second video we will see a neat trick where we will generate Random value between specified two numbers.
Let us see the same concept in following SQL in Sixty Seconds Video:
Related Tips in SQL in Sixty Seconds:
- SQL SERVER – Random Number Generator Script – SQL Query
- Generate A Single Random Number for Range of Rows of Any Table – Very interesting Question from Reader
- Retrieving Random Rows from Table Using NEWID()
What would you like to see in the next SQL in Sixty Seconds video?
Reference: Pinal Dave (http://blog.sqlauthority.com)