SQL Server 2012 Stored Procedure to accept an IN parameter and do multiple inserts
<p>I want to create a SQL Server 2012 Stored Procedure that will take an array from PHP as an IN parameter.</p>

<p>The table that the procedure will insert into is called dbo.Users and it will have three columns that I care about: createdby, userid, emailaddress</p>

<p>The array will include userid and email address. It call will include one OR more records to insert into the Users table.</p>

<p>How do I get the procedure to accept an array and how do I turn the array into multiple insert statements into my Users table? Do I need to use table value parameters? I heard of them but haven't used one before.</p>

<p>Thank you!</p>