0
table1:
name,
address,
phone


table2:
name,
location,
mobile

table1 is a just a schema of blank data. table2 has data.

I would like to insert table2 data into table1 schema.

How can I insert data like name-->name, address-->location and phone-->mobile

Divyang Desai
  • 7,483
  • 13
  • 50
  • 76
  • Possible duplicate of [Insert all values of a table into another table in SQL](http://stackoverflow.com/questions/576441/insert-all-values-of-a-table-into-another-table-in-sql) – starko Sep 24 '16 at 10:52
  • Here you are. I find another example and change link – starko Sep 24 '16 at 10:57

1 Answers1

1
insert into table1 (name, address, phone)
select name, location, mobile from table2
juergen d
  • 201,996
  • 37
  • 293
  • 362