Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Insert the table through looping

$
0
0

I have the query like below .Bus table has 10 million records. so I want to insert into temp table by each million through looping. Instead of inserting 10 million records , I want that to be done in  looping by 1 million each.

Thanks in advance

insert

intotemp(a1,b1)

select

a1,b1

from

(

select

a,bfromBus

where

ar='a')sr


Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>