Integer or Numeric

  • What is better to use numeric or integer in the table, which takes less space?All for uniquie(auto) number what should I use numeric or int?

    Thank you

  • It always depends on how much data you expect in that table. We can't answer that for you.

    http://msdn.microsoft.com/en-us/library/ms187745.aspx

  • I agree with Ninja. It will depend on the data and how much you will need to store.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Krasavita (6/1/2011)


    What is better to use numeric or integer in the table, which takes less space?

    It's got nothing to do with space and everything to do with what you're storing. 17.5 can't be stored in an integer but can in a numeric.

    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 4 posts - 1 through 3 (of 3 total)

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