int data type

Posted on 2007-10-04
Last Modified: 2010-03-19
How many digits of number int data type can store?  I would to use int data type for record_key field which will have multi millions of records.. would int data type be enough for this ?
Question by:jung1975
    LVL 92

    Assisted Solution

    by:Patrick Matthews
    int tops out at about 2.1 billion, so you should be safe :)
    LVL 27

    Accepted Solution

    2GB - if you need to go higher than use bigint

    From BOL


    Has a length of 8 bytes and stores numbers from 2^63 (-9,223,372,036,854,775,808) through 2^63-1 (9,223,372,036,854,775,807).

    integer or int

    Has a length of 4 bytes, and stores numbers from -2,147,483,648 through 2,147,483,647.


    Has a length of 2 bytes, and stores numbers from -32,768 through 32,767.


    Has a length of 1 byte, and stores numbers from 0 through 255.

    LVL 16

    Assisted Solution

    On "32-bit" machines the int data type takes up 4 bytes (232). The short is usually smaller, the long can be larger or the same size as an int and finally the long long is for handling very large numbers.
    LVL 10

    Assisted Solution


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Suggested Solutions

    CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
    Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
    This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
    This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now