I have a target table t1 like this (parent and parent_country are the corresponding id) with a few thousand entries:
id parent parent_country name type
1 0 0 USA country
2 0 0 Canada country
3 1 1 Alabama state
4 1 1 California state
5 4 1 Los Angeles city
...
and a source table t2 like this wth a few thousand entries:
loc_text_1 loc_text_2 loc_text_3
Long Beach California USA
Frankfurt Hessen Germany
Los Angeles California USA
...
How can I INSERT the values from t2 INTO t1 and furthermore (of course) only those cities, states, and countries which are not already in t1? (id in t1 is an autoincremented primary key)
t1empty?t1? You better just post the crate statements for both tables. UseSHOW CREATE TABLE <table name>