Let's say I have two tables:
Family [idFamily, idPerson] and
Person [idPerson, hasFamily]
How can I put the first 5 people from Person who has hasFamily='no' into Family with idFamily=1? I've already figured out that I can use:
select * from Person where hasFamily = 'no' limit 5
But I'm unsure about the insert part.
(I've already asked this before on http://www.reddit.com/r/learnprogramming/comments/2sv1n4/sql_question_about_insert_into/ but the solution did not work)