1-- generate a identity, and guid table without looping
2;with guids( i, guid ) as
3(
4 select 1 as i, newid()
5 union all
6 select i + 1, newid()
7 from guids
8 where i < 10000
9)
10
11select i, guid
12from guids
13order by i desc