title: Use a variable or parameter to specify restart value for ALTER SEQUENCE
body: <p>I have a situation where I need to restart a sequence to a specified value, where this value is specified in either a variable or passed as a parameter programically from a C# program.</p>
  
  <p>The following code is an example of what I hoped would work, but didn't:</p>
  
  <pre><code>DECLARE @current_value AS BigInt = 60000;
  
  ALTER SEQUENCE
      usq_MySequence
  RESTART WITH
      @current_value
  </code></pre>
  
  <p>Something like this does work:</p>
  
  <pre><code>ALTER SEQUENCE
      usq_MySequence
  RESTART WITH
      60000
  </code></pre>
  
  <p>however that's hard coded, and the program I'm interacting with will only pass parameters (Using the SqlCommand in .NET)</p>
  
  <p>Is there anyway to reset a sequence with a variable or parameter?</p>