Make SQL Select same row multiple times

后端 未结 11 2175
南方客
南方客 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:58

    easy way...

    This exists only one row into the DB

    sku = 52 , description = Skullcandy Inkd Green ,price = 50,00
    

    Try to relate another table in which has no constraint key to the main table

    Original Query

    SELECT  Prod_SKU , Prod_Descr , Prod_Price FROM  dbo.TB_Prod WHERE Prod_SKU = N'52'
    

    The Functional Query ...adding a not related table called 'dbo.TB_Labels'

    SELECT TOP ('times')  Prod_SKU , Prod_Descr , Prod_Price FROM  dbo.TB_Prod,dbo.TB_Labels WHERE Prod_SKU = N'52'
    

提交回复
热议问题