I need a query to do the following: find countryID, where country = 'UK' from the Countries table
then use the found value in
INSERT into towns (id, country_fk, name)
values (1, <value_found>, 'London').
Is it possible?
UPDATE I need to save the value once so that I can use it in several INSERTS (about 100)
source
share