mysql round decimal 2 places code example
Example 1: round one decimal place mysql
SELECT ROUND(20.555, 1);
-- 20.5
SELECT ROUND(20.5, 0);
-- 21
Example 2: sql limit decimal places
SELECT CAST(ROUND(125.025000, 2) AS NUMERIC(36,2))
returns: 125.03
Example 3: mysql alter decimal precision
ALTER TABLE YourTableNameHere MODIFY COLUMN YourColumnNameHere decimal(4,2)
Example 4: round decimal mysql
round(column)