title: How to use IN Operator in SQL Server
body: <p>How to use IN Operator in SQL Server</p>
  
  <p>Here Is the table Structure</p>
  
  <pre><code>Create Table Sample(Id INT,Name Varchar(50))
  </code></pre>
  
  <p>While I am the Query like this I can get the Value</p>
  
  <pre><code>Select * FROM Sample WHERE Id IN ('74','77','79','80')
  </code></pre>
  
  <p>While I am executing the above Query I can't able to get the Records Related to that table getting error executing this error.</p>
  
  <pre><code>DECLARE @s VARCHAR(MAX)
  
  SET @s='74','77','79','80'
  
  Select * FROM Sample WHERE Id IN (@s)
  </code></pre>