- FORMAT(数值,保留位数) 四舍五入
SELECT *,FORMAT(score/3,2) from student
- ROUND(数值,保留位数) 四舍五入
SELECT ROUND(score/3,2) from student
- CONCAT(字符串 1,字符串 2····) 字符串拼接
SELECT CONCAT(customer_name,' (',address,')') from mt_customer
- LEFT(字符串,长度) 截取字符串左边 n 位
SELECT *,FORMAT(score/3,2) from student
SELECT ROUND(score/3,2) from student
SELECT CONCAT(customer_name,' (',address,')') from mt_customer