I've having trouble figuring out the SQL to do this.

I have two tables, user, and group_map, and I want to insert a row into
group_map for every row in user.

user
------------
user_id


group_map
------------
user_id
group_id


For each user_id:
        insert into group_map ( user_id, group_id ) values ( user_id, 6
)

Can I use a select into or something? Or should I just script it outside
of mysqlclient?

Ian.



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to