random number between 0 and 1 sql server code example Example: tsql random number SELECT FLOOR(RAND()*(b-a+1))+a;