SQL 15) -奇偶数 查找所有emp_no为奇数,且last_name不为Mary的员工信息
查找employees表
http://www.nowcoder.com/questionTerminal/a32669eb1d1740e785f105fa22741d5c
方法)NOT LIKE
- last_name不为Mary
- 按照hire_date逆序排列
- emp_no为奇数
偶数 -- [expression]%2 = 0
SELECT * FROM employees WHERE emp_no%2=1 AND last_name NOT LIKE 'Mary' ORDER BY hire_date DESC;