title: SQL Server procedure with 2 arguments - why doesn't work?
body: <p>I have done everything like in tutorial:</p>
  
  <pre><code>CREATE PROCEDURE dbo.checkDiff 
       @table1 NVARCHAR(50), 
       @table2 NVARCHAR(50)
  AS
      SELECT * 
      FROM @table1 
      EXCEPT 
      SELECT * 
      FROM @table2
      UNION ALL
      SELECT * 
      FROM @table2 
      EXCEPT
      SELECT * 
      FROM @table1
  go
  </code></pre>
  
  <p>But I get some errors:</p>
  
  <blockquote>
    <p>Msg 1087, Level 16 State 1, Procedure checkDiff, Line 3 [Batch Start Line 25]<br>
    Must declare the table variable "@table1". </p>
  </blockquote>
  
  <p>(<em>same error, repeated several times</em>)</p>