I have a table with millions of rows. I need to insert data from this table into another table in the same database.
How do I insert the data from one table to another table in bulk using sql query in SQL Server 2012.
I have a table with millions of rows. I need to insert data from this table into another table in the same database.
How do I insert the data from one table to another table in bulk using sql query in SQL Server 2012.
SELECT * INTO NewTableName FROM OldTableName
Try this.
you can create and populate a table in sql server very easy like this :
select *
into NewTable
from yourtable
and when you want to copy into an existing table you can use this
insert into existingtable (field1, field2,...)
select field1, field2,... from yourtable