Jump to content

[SOLVED] using subquery to populate new table


menriquez

Recommended Posts

yes i am having a dumb issue on a easy problem.  all i want to do is take the email field from on table to create a user key field in another, so i am trying this...

 

INSERT INTO scores (user_id) 

select email from contestants;

 

i get a "duplicate key 0 in field 1" error, which means my select is return an integer and not the email string...whats up with that?

 

- mark

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.