Having Trouble Understnading Float Data Type

  • Hello Everyone

    I have a question that I should already know, but I am having trouble wrapping my head around it.

    I am working on a database that uses Float data types for all the relationships. I am trying to understand how to read the float by just looking at it. And also, how to add or subtract a 1 or a 5 or another number to the float. This may seem simple to some, and it was to me when I was in high school, but the more I work with this, the more I am confusing myself.

    I would greatly appreciate someone hand holding me and explaining this in simple steps. I have read the BOL, and they help, but I am just not getting it.

    Thank you in advance for all your help and understanding.

    Andrew SQLDBA

  • AndrewSQLDBA (1/25/2014)


    I am trying to understand how to read the float by just looking at it. And also, how to add or subtract a 1 or a 5 or another number to the float

    Could you clarify the problem please? Float is just a number, just like any other number in how it's read and manipulated.

    DECLARE @Var FLOAT;

    SET @Var = 1.3555;

    SELECT @Var, @Var + 1, @Var-5;

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply