查询进阶
IFNULL()
IFNULL(A,x):将A中为NULL的项换成x
示例:
SELECT
IFNULL( commission_pct, 0 ) AS sal
FROM
employees
条件查询
语法:
示例:
1,
SELECT
*
FROM
employees
WHERE
salary > 12000
2.
SELECT
first_name,department_id
FROM
employees
WHERE
department_id != 90