I'm not proficient with SQL and Ive been looking for a solution to which is probably a simple one for those that know what they're doing.
I have a two column table with user_id and group_id. It stores all the groups a particular user is a part of.
i.e.
user_id, group_id 2 4 2 6 2 7 3 4 4 6 4 7 You get the idea.
All I want to do is insert the user_id and new group_id (let's say 10) records into the table for those who are part of a specific group_id (like 6). I Have been trying different INSERT WITH SELECT statements but keep getting errors. I search around, but couldn't get one to work properly from the examples given.
Could anyone help me out?