Deciaml ,Float and Real Data types in sql sever

Decimal Types


deciaml[(P,(,S)] and numeric[(P[,S])]

Numeric data types that have fixed preciion and scale

The maximum total number of decimal digits that can be stored,bith to the left and to the right of the decimal point.The precision must be a value from 1 through the maximum precision of 38.

The default precision is 18

The maximum number of decimal digits that can be stored to right of the decimal point scale must be a value from 0 through p.scale can be specified only if precision is specified.The default scale is zero.Maximum storage sizes vary based on the precision as following

        Precision                    Storage Bytes
       ----------                    --------------

        1-9                              5
        10-19                            9
        20-28                            13
        29-38                            17

Float and Real


Float[[n]] and real

An approximate-number data types for use with floating point numeric dats.Floating point data is approximate;therefore,not all values in the datatype range can be represented exactly.where 'n' is the number of bits that are used to store the mantissa of the float number in scientific notation and therefore,dictates the precision and storage size.if n is specified,it must be value betwwen 1 and 53.The default value of n is 53.

        n value                Precision             Storage size
      ---------------        ---------------        ------------------------

         1-24                   7 digits                 4 bytes
         25-53                  15 digits                8 bytes
About Author: author 4 + years of Information Technology experience in understanding and analyzing the software and hardware engineering requirements, onsite and offshore management of product development. Expert work on design and development for windows,web,mobile Expert knowledge of C#,ADO.NET, ASP.Net MVC, ENTITY FRAMEWORK, LINQ,COLLECTIONS, JAVASCRIPT,AngularJs 1.0,Angular2, Jquery,Jquery-Ajax, SQL SERVER, XAML,Windows phone 8.1 Good knowledge of WCF-Restful services,WCF, WEB API-Services ,Web- Services,MIcrosoft-Azure,JUICE UI,HTML,CSS,AJAX Read More...

Join him on Google+ | Facebook | Linkedin

No comments