What is MySQL Data Type Reference?
Choosing an appropriate database type affects storage, range, validation, and query behavior. MySQL and MariaDB provide numeric, string, date/time, and binary types. This quick reference summarizes common types; exact ranges and features can vary by server version and SQL mode.
What can you use it for?
- Compare INT, BIGINT, and DECIMAL for numeric values.
- Choose a date/time type for application records.
- Review text and binary types before designing a table.
How to use this tool
- Enter a type name such as BIGINT, VARCHAR, DECIMAL, or DATETIME.
- Select Look up data type.
- Review its category, description, and design notes.
- Confirm exact limits against the documentation for your server version.
Example input
Look up DECIMAL to review exact-value numeric storage.
DECIMAL
Tips and things to know
- Use DECIMAL for exact decimal values such as monetary amounts; FLOAT and DOUBLE are approximate.
- Choose VARCHAR based on expected character length and indexing needs.
- This is a concise reference, not a complete server-version-specific specification.
Frequently asked questions
Should I use FLOAT or DECIMAL for money?
DECIMAL is generally appropriate for exact decimal arithmetic; floating-point types are approximate.
What is the difference between DATETIME and TIMESTAMP?
They have different storage and timezone conversion behavior. Check your MySQL or MariaDB version documentation before choosing.
Are the listed limits universal?
No. Some limits and behavior depend on server version, configuration, character set, and SQL mode.