DECLARE @Min INT,@Max INTSET @Min = 6SET @Max = 132333SELECT CAST((RAND() * (@Min-@Max) + @Max) AS INT)