According to http://www.sqlite.org/datatype3.html
[decimal is one of several] common datatype names from more traditional SQL implementations are
converted into [SQLite] affinities
(An affinity is about as close to the idea of a data type that SQLite has. Read http://www.sqlite.org/datatype3.html for more about this.)
By this logic, it seems safe to use the documentation from MySQL to explain the SQLite decimal precision notation.
According to http://www.sqlite.org/datatype3.html
Standard SQL requires that DECIMAL(5,2) be able to store any value
with five digits and two decimals, so values that can be stored in the
salary column range from -999.99 to 999.99.
So decimal(10,5)
indicates that the field should be used to store a value up to ten digits in length, with up to five digits before the decimal point and up to five digits after the decimal point.
Of course, any value entered will be stored, even if it doesn't keep to these rules, which means that the field definition is basically documentation.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…