Matching a value then transferring data from one table to another

I know the Insert sql:

[php]

INSERT INTO table1 (value,value,value) SELECT table2.value, table2.value, table2.value FROM table2;

[/php]

I have this situation
Table 1 and table 2 have 4 fields that are the same.

St - Zip - Longitude - Latitude

the table1 has values like this:

St Zip Longitude Latitude
MD 21108 101.5638 89.3472
MD 21061 102.6348 90.0374
MD 21062 102.1256 90.1259

Table 2 has these values:

St Zip Longitude Latitude
MD 21108
MD 21061
MD 21062

What I need to do is take the Zip values with the attached Longitude and Latitude value from table one and match it up with the Zip value in table 2 so i can insert the Longitude and Latitude into table 2. Currently those values do not exist in table 2…

Sponsor our Newsletter | Privacy Policy | Terms of Service