Loading section...

INTEGER for whole numbers

Integer literals in SQL are written as bare numbers without quotes. SQL uses quotes to distinguish strings from numbers: 42 (no quotes) is a number, while '42' (with quotes) is text. Integer Applications Integers are the most common type for IDs, counts, and any whole number data. Understanding storage size helps you choose between integer types for performance-sensitive tables. Integer types are hardware-accelerated in modern CPUs. Operations on integers run faster than equivalent operations on strings or decimal types, which matters at analytical scale.