I need help with the following SQL
I have two tables titles
and postcode_db
I want to LEFT JOIN and INSERT into a third table
SELECT titles.id, titles.title, titles.address,
postcode_db.postcode, postcode_db.suburb
FROM titles
LEFT JOIN postcode_db ON titles.address = postcode_db.suburb;
Above works. I want to insert into titles_postcode
titles.id AS titles_postcode.title_id
titles.title AS titles_postcode.title
postcode_db.postcode
INSERT INTO titles_postcode
(titles.id AS titles_postcode.title_id,
titles.title AS titles_postcode.title,
postcode_db.postcode AS titles_postcode.postcode)
SELECT titles.id, titles.title, titles.address,
postcode_db.postcode, postcode_db.suburb
FROM titles
LEFT JOIN postcode_db ON titles.address = postcode_db.suburb;
Its returning error right syntax to use near 'AS titles_postcode.title_id, titles.title AS titles_postcode.title, postcode_db.' at line 1