add decimal to mysql code example
Example 1: mysql text to decimal
SELECT CAST(colName AS DECIMAL(10,2))
FROM tableName
Example 2: round one decimal place mysql
SELECT ROUND(20.555, 1);
-- 20.5
SELECT ROUND(20.5, 0);
-- 21
SELECT CAST(colName AS DECIMAL(10,2))
FROM tableName
SELECT ROUND(20.555, 1);
-- 20.5
SELECT ROUND(20.5, 0);
-- 21