Make SQL Select same row multiple times

后端 未结 11 2189
南方客
南方客 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条回答
  •  不知归路
    2020-12-11 16:59

    If your are doing this in sql Server

    declare @cnt int
    set @cnt = 0
    
    while @cnt < 1000
    begin
        select '12345'
        set @cnt = @cnt + 1
    end 
    

    select '12345' can be any expression

提交回复
热议问题