Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2002
    Posts
    10

    Question Unanswered: Doubt in Data Type

    I am currently allotting data types to attributes. I would like know the usage of Float visa vis Decimal. Say I have got a field whose maximum holding capacity is Decimal(11,3) which the data may ocassionaly reach. Is it advisable to have float istead of Decimal. Will float have any overhead/benifits in terms of performance and storage. Float, I find is not commonly used in commercial applications.

    Is there any overhead on Varchar as an Primary Key.


    Please advise me the earliest.

    Thanks
    M.Prakash

  2. #2
    Join Date
    Jan 2003
    Posts
    1,605

    Re: Doubt in Data Type

    Hi,

    Varchart has an overhead specialy if you have big tables (like in data warehouse). In this case try using the integer instread if posible.

    Hope this helps,
    Grofaty

  3. #3
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Grofaty,
    According to the SQl Reference manual, FLOAT and DOUBLE are approximations of real numbers. This basically means that the values stored as one of these types is not exactually accurate. And all math done on these types is not accurate for the same reason-they are approximations. If you need accuracy, stick to DECIMAL where the only problem is loss of precision in some math operations.

    HTH

    Andy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •