Answers for "mysql function returns DECIMAL"

SQL
1

mysql decimal allow negative values?

/*
Negative values are allowed as long as the field is not specified to be unsigned.

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
*/
Posted by: Guest on December-02-2020
0

round one decimal place mysql

SELECT ROUND(20.555, 1);
-- 20.5
SELECT ROUND(20.5, 0);
-- 21
Posted by: Guest on November-25-2020

Code answers related to "mysql function returns DECIMAL"

Code answers related to "SQL"

Browse Popular Code Answers by Language