0 - 2 of 2 tags for random numbers

Hi All,
I have used the random(<min_value>,<max_value>) function to generate numbers. However, this only works when the values then numbers are entered manually.
For example
SELECT A.*, RANDOM(1,10) FROM TABLE_NAME A;
works
but 
SELECT A.*, 10 AS TEST, RANDOM(1,TEST) FROM TABLE_NAME A;
doesn't

How to generate a table of a given size (say, 1 million rows) with a column that represent a random number?
I need to create a table, which will have two columns: row_num, rand_num:
Row_num rand_num
             1           23
             2             3
             3           12