• + 0 comments

    CREATE TABLE t ( Colm int, ); declare @x int =2 declare @i int declare @b int declare @z int while @x >=2 and @x<=1000 begin set @i=@x set @b=2 set @z=0 while @b < @i begin if @i%@b=0 set @z=@z+1 set @b=@b+1 end if @z=0 INSERT INTO t (colm) VALUES (@i);

    set @x=@x+1
    

    end select STRING_AGG(colm, '&') clom from t