Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 copy records from table to another where...

Author  Topic 

asifbhura
Posting Yak Master

165 Posts

Posted - 2007-09-01 : 02:50:32
hi everyone

I have two tables in my DB.

table1 contains name, address,phone etc.which is having records as well.

while table2 has completely different fieldname with different datatypes and less or more field than table1.

now i want to copy records from table1 to table2

how to do using query.

waiting for reply.

Regards,
ASIF

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-09-01 : 02:58:29
insert into table2 ( <column name list> )
select <column name list>
from table1


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -