title: T-SQL data type REAL FLOAT(n) on SQL Server
body: <p>Is anyone aware of the reasons why the following line of T-SQL code works (under SQL Server 2008)?</p>
  
  <pre><code>SELECT cast(2 as real(10))
  </code></pre>
  
  <p>I expect the server to complain in the very same way it does when I attempt this:</p>
  
  <pre><code>declare @x real(10)
  set @x  = 4.1234567
  select @x
  </code></pre>
  
  <p>and I get:</p>
  
  <pre><code>Msg 2716, Level 16, State 1, Line 16
  Column, parameter, or variable #2: Cannot specify a column width on data type real.
  </code></pre>
  
  <p>I realise that for MS SQL 2008 there is a data type REAL equivalent to FLOAT(24).</p>
  
  <p>I just would like to know why CAST does not complain, i.e., it was possible to write nonsense as REAL(4,2) within CAST (under SQL 2000), it works fine with REAL(10) under SQL 2008 (again in CAST)?</p>
  
  <p>Any suggestions and clarification appreciated. Thank you.</p>