title: Execute Stored Procedure for List of Parameters in SQL
body: <p>I have an Stored Procedure that have an argument named <code>Id</code>:</p>
  
  <pre><code>CREATE PROCEDURE [TargetSp](
     @Id  [bigint]
  )
  AS 
  BEGIN
     Update [ATable]
     SET [AColumn] = 
     (
       Select [ACalculatedValue] From [AnotherTable]
     )
     Where [ATable].[Member_Id] = @Id
  END
  </code></pre>
  
  <p>So I need to use it for a list of Id's not for one Id like :</p>
  
  <pre><code>Exec [TargetSp]
    @Id IN (Select [M].[Id] From [Member] AS [M] Where [M].[Title] = 'Example');
  </code></pre>
  
  <p>First: How can I Execute it for a list?</p>
  
  <p>Second: Is there any Performance difference between I execute the sp many times or rewrite it in target script?</p>