Sajith Sajith - 2 years ago 94
SQL Question

How to import data from one table to another table in sql

I have two database there is two table both databse
how to import data from database table to another database table in sql2008 standard edition. I have tried to export/import function but no luck .
would you Please help me ?

Answer Source

I think the code below will work for your case:

INSERT INTO table1 (column1,column2)
SELECT oldcolumn1,oldcolumn2
FROM table2 

Optionally you could add a where clause.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download