title: What is the SQL Server equivalent of EXECUTE IMMEDIATE INTO in Oracle
body: <p>What is the SQL Server equivalent of <code>EXECUTE IMMEDIATE INTO</code> in Oracle?</p>
  
  <p>E.g.</p>
  
  <pre><code>DECLARE QRY varchar(100);
  
  val int;
  
  BEGIN
  
  QRY:='select count(*) from production.product';
  
  **EXECUTE IMMEDIATE** QRY **into** val;
  
  dbms_output.put_line(val);
  
  END;
  
  /
  </code></pre>