Absolutely! Let’s go through database data types. I’ll focus on the common ones used in SQL databases like MySQL, PostgreSQL, and SQL Server.


1. Numeric Data Types

Type Description Example
INT / INTEGER Whole numbers 0, 10, -5
BIGINT Large whole numbers 1234567890
SMALLINT Smaller range integer 100, -50
DECIMAL(p, s) / NUMERIC(p, s) Exact decimal numbers; p = precision, s = scale 10.50, 123.45
FLOAT / REAL Approximate floating-point numbers 3.14, 2.718
DOUBLE Double-precision floating-point 3.1415926535

2. Character / String Data Types

Type Description Example
CHAR(n) Fixed-length string, padded with spaces 'ABC ' (length 5)
VARCHAR(n) Variable-length string 'Hello', 'Database'
TEXT / CLOB Large text data 'Lorem ipsum...'

3. Date and Time Data Types

Type Description Example
DATE Stores date only (YYYY-MM-DD) '2025-08-28'
TIME Stores time only (HH:MM:SS) '14:30:00'
DATETIME / TIMESTAMP Stores date and time '2025-08-28 14:30:00'
YEAR Stores year 2025

4. Boolean Data Types

Type Description Example
BOOLEAN / BOOL True or False TRUE, FALSE
BIT Stores 0 or 1 0, 1

5. Binary / Blob Data Types

Type Description Example
BLOB Binary Large Object (images, files) image data
BINARY(n) Fixed-length binary 10101010
VARBINARY(n) Variable-length binary file bytes

6. Misc / Special Data Types