select concat(last_name,first_name) as 姓名 from employees;
#只会修改last_name不会修改first_name
SELECT first_name,last_name AS f FROM employees;
#将两个列用逗号隔开并命名为out_put
SELECT CONCAT(`last_name`,‘,‘,`phone_number`) AS out_put FROM employees;
#ifnull 判断是否为空,如果为空则显示为0而不是null,并将列名显示为结果
SELECT IFNULL(commission_pct,0) AS 结果 FROM employees;
原文:https://blog.51cto.com/14437184/2434445