SQL Server Interview Question #24

What is the difference between INT and BIGINT?

Data Types, Keys & Constraints Junior Beginner

Detailed Explanation

INT and BIGINT both store whole numbers, but they have different ranges and storage requirements.

INT uses 4 bytes and supports values from -2,147,483,648 through 2,147,483,647. BIGINT uses 8 bytes and supports a much larger range.

INT is sufficient for many primary keys and counters. BIGINT is appropriate when the expected row count or business identifier can exceed the INT range. Choosing BIGINT unnecessarily increases storage for the column and related indexes.