Call now: (800) 766-1884  


 SQL Server Tips
 SQL Server Training

 SQL Server Consulting
 SQL Server Support
 SQL Server Remote DBA

 SQL Server Scripts
 Scripts Menu




  SQL Server Tips by Gama and Naughter

Real and float

Real is a floating point numeric value with valid values 3.40E + 38 through -1.18E - 38, 0 and 1.18E - 38 through 3.40E + 38.
Float has valid values - 1.79E + 308 through -2.23E - 308, 0 and 2.23E -308 through 1.79E + 308.
The following example shows how a real value is stored using 32 bit IEEE single-precision:

DECLARE @r real
SET @r=12345.67
SELECT CAST(@r as binary(4))

12345.67 4

Converting 4640E6AE to binary:

0 10001100 10000001110011010101110
0 1 8 9 31

S is the sign of the mantissa, E the exponent and F is the decimal part of the mantissa.

S=0, E=140, F=81CD5C => 1.F=1.81CD5C=1.50703979

Using the IEEE formula:


The above book excerpt is from:

Super SQL Server Systems
Turbocharge Database Performance with C++ External Procedures

ISBN: 0-9761573-2-2
Joseph Gama, P. J. Naughter  


Burleson Consulting Remote DB Administration







Burleson is the America's Team

Note: The pages on this site were created as a support and training reference for use by our staff of DBA consultants.  If you find it confusing, please exit this page.

Errata?  SQL Server technology is changing and we strive to update our SQL Server support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:and include the URL for the page.

Burleson Consulting
SQL Server database support


Copyright 1996 -  2013 by Vaaltech Web Services. All rights reserved.

Hit Counter