Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图弄清楚如何在 sql server 中创建一个临时表,该表将基于一个数字创建许多行。
所以我有一个查询结果为 35,我想创建一个临时表,其中包含 35 行,ID 值为 1 - 35。
declare @i int set @i = 1 while (@i <= 35) begin insert tmp (id) values (@i) set @i = @i + 1 end