I can't get this SQL statement right. I want to select band emails into another table but I don't understand what I'm doing wrong:
INSERT INTO submitted (mail)
SELECT
submitted.bandid,
band.mail,
band.id
FROM
band
WHERE
submitted.bandid = band.id
Can anybody help me?
mail) in your new table - but you're selecting three columns from the original table - that won't work. Either define the three columns you want to insert those values into in your destination table, OR just select the one column you want to actually use to insert data from the source table