• You could apply an identity column if there isn't any.

    ALTER TABLE table1 ADD id_temp INT NOT NULL IDENTITY(1,1)

    -- This adds an identity column (id_temp) temporarily. You can remove the column later after your inserts complete.

    DECLARE @batch_sizeINT,

    @row_counterINT,

    @maxrow_countINT;

    SET @batch_size= 5000; -- batch of 5000

    SET@row_counter= 1;

    SELECT @maxrow_count = max(id_temp) FROM table1

    WHILE @row_counter <= @maxrow_count

    BEGIN

    INSERT INTO table2 (col1)

    SELECT col1

    FROM table1

    WHERE 1 = 1

    AND id_temp between @row_counter and (@row_counter + @batch_size)

    -- Set the @row_counter to the next batch start

    SET @row_counter = @row_counter + @batch_size + 1;

    END

    You can now drop the identity column (id_temp) from table1.