Answers for "handling union all while loop php"

SQL
0

how to use select union and loop

CREATE TABLE #Temp
(
  <COLUMNS>
)

 DECLARE @position INT
 SET @position = -1

 WHILE(@position < 1)
 BEGIN

    INSERT INTO #Temp (<COLUMNS>)
    SELECT * FROM mytable

    SET @position = @position + 1

 END

 SELECT * FROM #Temp
Posted by: Guest on January-07-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language