Q&A for professional and enthusiast programmers
WITH randomNumbers AS ( SELECT RAND( /*seed:*/ 123 ) AS n UNION ALL SELECT RAND() AS n UNION ALL SELECT RAND() AS n UNION ALL SELECT RAND() AS n UNION ALL SELECT RAND() AS n UNION ALL SELECT RAND() AS n UNION ALL SELECT RAND() AS n UNION ALL SELECT RAND() AS n UNION ALL SELECT RAND() AS n UNION ALL SELECT RAND() AS n ), randomNumbersFrom1MTo40M AS ( SELECT CONVERT( int, r.n * 40000000 ) AS RandomValue FROM randomNumbers AS r ) SELECT r2.RandomValue AS "Post Link", r2.RandomValue FROM randomNumbersFrom1MTo40M AS r2