Make SQL Select same row multiple times

后端 未结 11 2188
南方客
南方客 2020-12-11 16:02

I need to test my mail server. How can I make a Select statement that selects say ID=5469 a thousand times.

11条回答
  •  旧时难觅i
    2020-12-11 16:54

    create table #tmp1 (id int, fld varchar(max)) insert into #tmp1 (id, fld) values (1,'hello!'),(2,'world'),(3,'nice day!')

    select * from #tmp1 go

    select * from #tmp1 where id=3 go 1000

    drop table #tmp1

提交回复
热议问题