To get random number in sql we use rand() function. Rand() funcition returns decimally random between 0 and 1. Rand() function doesn’t get any parameters
Example 1 : Show random number between 0 and 1;
1 |
Select rand() |
Result: 0.55458455…
To see defferent examples 1 and 100, 50 and 100 etc… click the link