tsql random number -RAND TSQL NEWID code example Example: tsql random number SELECT FLOOR(RAND()*(b-a+1))+a;