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
 General SQL Server Forums
 New to SQL Server Programming
 Insert data of table 2 to table 1,how?

Author  Topic 

debradeng
Starting Member

46 Posts

Posted - 2007-01-05 : 19:03:23
Table 1:
cityId ,cityname,state
and
Table 2:
Id,cityname,State,...

There are a large amount of data (Cityname and State)in table 2 is valueable,I want insert them into table1.

But I don't know how,anybody can help?what I should do and what I should notice?
Thank you!

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2007-01-05 : 19:13:33
[code]
insert into Table1 (Cityname,State)
select Cityname,State
from Table2
[/code]

CODO ERGO SUM
Go to Top of Page
   

- Advertisement -