title: Cannot assign a default value to a local variable in SQL
body: <p>I am trying to declare local variable like:</p>
  
  <pre><code>DECLARE @thresholdDate DATETIME = '2014-11-30'
  </code></pre>
  
  <p>And I am getting error:</p>
  
  <blockquote>
    <p>Cannot assign a default value to a local variable.</p>
  </blockquote>
  
  <p>As per <a href="http://msdn.microsoft.com/en-us/library/ms188927.aspx">documentation</a>:</p>
  
  <pre><code>DECLARE @find varchar(30); 
  /* Also allowed: 
  DECLARE @find varchar(30) = 'Man%'; 
  */
  </code></pre>
  
  <p>What I am doing wrong? </p>