As a beginner with MySQL, I want to get this right. My main hangup right now is the DECIMAL type.
From the docs:
As of MySQL 5.0.3, values for DECIMAL
columns are represented using a binary
format that packs nine decimal (base
10) digits into four bytes. Before
MySQL 5.0.3, DECIMAL columns are
represented as strings and storage
requirements are…
So the question is, which data types should I NOT be quoting during an INSERT? I assume I should not use quotes around any of the INTs, FLOAT, DOUBLE and REAL. What about DECIMAL? Any I’m forgetting?
EDIT:
I understand MySQL will “convert to the proper type,” but I want to get the right answer regardless. =)
I understand from the quotation that decimal values are stored in the hard disk as four byte binary values from 5.0.3 onwards, but I expect them to be represented using quotes for locale safeness. Multiple locales use different decimal “point” symbols, thousand separators and another symbols, these can’t be handle by the MySQL query parser, but by the data type parser that will parse the strings as decimals. I expect this to also apply to all floating point types: float, double and real too.