📜  tsql 生成行 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:25.240000             🧑  作者: Mango

代码示例1
-- generate a identity, and guid table without looping
;with guids( i, guid ) as
(
    select 1 as i, newid()
        union all
    select i + 1, newid()
        from guids
        where i < 10000
)

select i, guid   
from guids 
order by i desc