Comparison between real data types

  • Hi

    I have two variables having real as data type. I am using one function and the value is coming as same in both the variables.

    Now if the value is something like 12.8 in both the variable, then sql treats them equal variables but when value is coming as 14.2607 in both, then the first variable is treated as greater than the second one.

    Can anybody help?

  • Real data type is a approximate data types, it stores approximate values rather than the exact value. Generally this shouldn't be noticeable for small values. If you want to match values i.e. do a comparison like =, etc better not to use real data type.

    "Keep Trying"

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

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