I have a table called "artist" with three columns:
artist_id {PK} | artist_name | artist_url There are around 500+ artists in this table.
I want to be able to copy all of the primary keys over to a table called "artist_to_store". This table will have two columns:
artist_id {PK} | store_id. Store ID will always be equal to 0
I thought this query would work:
INSERT INTO artist_to_store SET artist_id = (SELECT artistr_id FROM artist) AND store_id = 0 Instead it reuturns with the error #1242 - Subquery returns more than 1 row.
I know what the error means so nobody needs to explain it. But could somebody please tell me how I get all of the artist_id's from the artist table to the other table?
Thanks, and a Happy New Year when it arrives :)
Peter