title: How to use variables in SQL raiserror
body: <p>I am trying to show my <code>int</code> variables in raiserror <code>@MaxAmount</code> and <code>@MinAmount</code> </p>
  
  <pre><code>Raiserror('Total Amount should be less than %s and Greater than %s',16,1,@MaxAmount,@MinAmount)
  </code></pre>
  
  <p>But Im getting error:</p>
  
  <blockquote>
    <p>Must declare the scalar variable "@MaxAmount".</p>
  </blockquote>