I have a form on my Website, where a Reseller enters his details, PLUS a list of companies he works with (using a checkbox for each company). On the DB side, I have 3 tables: a RESELLERS table, a COMPANIES table and a RESELLERS_COMPANIES junction table (for the many to many relationship). Now, when the Reseller submits the form, I get a LIST of companies he works with (any number of companies between 1 and 20). I therefore need to "loop" this "list", and INSERT each one to the junction table in a new row (the tables holds the Reseller_ID and the Company_ID). How do I do this? can it be done with one stored procedure? (again - I do not know in advance how many companies the reseller will choose when filling out the form).