T-SQL RAND()

PRINT CONVERT(INT,RAND()*26) -- 0 to 25
PRINT CONVERT(INT,RAND()*26)+1 -- 1 to 26
PRINT CONVERT(INT,RAND()*(N-M+1))+M -- M to N (M<N)
posted @ 2007-12-19 11:12  RobotTech  阅读(924)  评论(0编辑  收藏  举报