Others
suggest changeThere is already a separate entry for “FLOAT, DOUBLE, and DECIMAL” and “ENUM”. A single page on datatypes is likely to be unwieldy – I suggest “Field types” (or should it be called “Datatypes”?) be an overview, then split into these topic pages:
- INTs
- FLOAT, DOUBLE, and DECIMAL
- Strings (CHARs, TEXT, etc)
- BINARY and BLOB
- DATETIME, TIMESTAMP, and friends
- ENUM and SET
- Spatial data
- JSON type (MySQL 5.7.8+)
- How to represent Money, and other common ‘types’ that need shoehorning into existing datatypes
Where appropriate, each topic page should include, in addition to syntax and examples:
- Considerations when ALTERing
- Size (bytes)
- Contrast with non-MySQL engines (low priority)
- Considerations when using the datatype in a PRIMARY KEY or secondary key
- other Best Practice
- other Performance issues
(I assume this “example” will self-distruct when my suggestions have been satisfied or vetoed.)
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents