8 posts by 4 authors in: Forums > CMS BuilderLast Post: December 7, 2009 (RSS)
By Djulia - August 11, 2009 - edited: August 11, 2009
Re: [Djulia] Problem with MySQL Column Type
By Chris - August 11, 2009
When declaring a DECIMAL or NUMERIC column, the precision and scale can be (and usually is) specified; for example:salary DECIMAL(5,2)In this example, 5 is the precision and 2 is the scale. The precision represents the number of significant digits that are stored for values, and the scale represents the number of digits that can be stored following the decimal point. If the scale is 0, DECIMAL and NUMERIC values contain no decimal point or fractional part.Standard SQL requires that the salary column be able to store any value with five digits and two decimals. In this case, therefore, the range of values that can be stored in the salary column is from -999.99 to 999.99.In standard SQL, the syntax DECIMAL(M) is equivalent to DECIMAL(M,0). Similarly, the syntax DECIMAL is equivalent to DECIMAL(M,0), where the implementation is allowed to decide the value of M. MySQL supports both of these variant forms of the DECIMAL and NUMERIC syntax. The default value of M is 10.
salary DECIMAL(5,2)
Re: [chris] Problem with MySQL Column Type
By Djulia - August 11, 2009
By Djulia - September 5, 2009
By Djulia - September 5, 2009 - edited: September 5, 2009
By Dave - September 9, 2009
Re: [Dave] Problem with MySQL Column Type
By WillTherman - December 5, 2009 - edited: April 4, 2011
Re: [WillTherman] Problem with MySQL Column Type
By Dave - December 7, 2009