查询
去重
SELECT DISTINCT department_id FROM employees;
空值参数运算
如果值为null则使用0替换,任何值与null计算都为null
SELECT employee_id,salary "月工资",salary * (1 + IFNULL(commission_pct,0)) * 12 "年工资",commission_pct FROM `employees`;
标签:笔记,commission,pct,mysql,硅谷,null,id,SELECT From: https://www.cnblogs.com/rtnb/p/16649655.html