select *
from
(select [id]=row_number() over (order by getdate()),
date=convert(varchar(8),dateadd(dd,number,'2010-01-01'),112)
from
(select number from master..spt_values where type='p' )t ) X
join
(select '1' as id, 'A' as Col1 union all
select '2' as id,'B' as Col1 union all
select '3' as id ,'C' as Col1
) Y
on x.id % ( select count(*) + 1
from ( select '1' as id union all
select '2' as id union all
select '3' as id ) M)
=y.id
order by x.id
日程安排生成的sql语句
最新推荐文章于 2022-06-01 11:24:51 发布