title: How to use a variable inside IN operator
body: <p>I'm trying to write an application in C# that will pass a variable that contains multiple value separated by a comma, to a stored procedure</p>
  
  <pre><code>string state = "AZ, CA, VA"
  </code></pre>
  
  <p>I want my stored procedure to return all data for each state in the variable</p>
  
  <pre><code>CREATE PROCEDURE usp_GetStateInfo
  @state varchar(2)
  
  SELECT * FROM StateTable WHERE state IN (@state)
  </code></pre>
  
  <p>But when I do the code above I get an error saying 'Incorrect syntax'
  What am I doing wrong and how can I fix this?</p>
  
  <p>Thank you</p>