Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2003

    Unanswered: numeric data types in sqlserver

    Whats the difference between int,float and decimal in sql server.

    WHich data type takes how many bytes?

    What data type i should use to store the following sets of data



  2. #2
    Join Date
    Oct 2003
    int is for integers. 4-byte. Max value is 2^31. This looks adequate for your first set although if the numbers will exceed 2^31 you should use bigint (8 bytes)

    float is for floating point numbers (non-integers). You will need floating point for the second set. I would suggest the double type for that set.

    decimal, numeric, and float all support customizable precision levels. BOL has pretty good documentation on this.

Posting Permissions

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