sql - 使用循环创建表
如何使用while来放置这些表x行,这些行将包含行号和单词' row'。
例如Row1,Row2,Row3,......
最佳答案:
1 个答案:
答案 0 :(得分:2)
递归CTE:
;with t(n) as (
select 1 union all
select n 1 from t where n < 100 --x
)
select 'Row' cast(n as varchar(8)) as f into NEW_TABLE from T
本文经用户投稿或网站收集转载,如有侵权请联系本站。