title: Insert into Table use Array in SQL Server 2008
body: <p>This is my table:</p>
  
  <p><strong>Phone</strong>: Id, MemberId, Number, PhoneType, IsDefault</p>
  
  <p>I need an stored procedure to get an array of <code>numbers</code> and a <code>memberId</code> as argument and insert all of them to <code>Phone</code> Table. I can't pass numbers one by one I need to insert all of them or none of them. I think to pass numbers  as a list of separated by comma <code>Nvarchar</code> like <code>'0412589, 0425896, 04789652'</code> I must mention <code>MemberId</code> is always constant and pass by argument, <code>PhoneType</code> always constant <code>='phone'</code>, and for first number of array <code>IsDefault = 1</code> for others <code>IsDefault = 0</code> How can I select Numbers from <code>numbers</code> and set other columns in insert command? Or you have another suggestion to pass array of numbers?</p>