一、查询没有奖金,且工资小于18000的salary,last_name

    1. select salary,last_name
    2. from employees
    3. where commission_pct is null and salary<18000;

    二、查询employees表中,job_id不为’IT’或者工资为12000的员工信息

    1. select *
    2. from employees
    3. where not job_id='IT'
    4. or salary=12000;

    三、查看部门departments表的结构

    1. desc departments;

    四、查询部门departments表中涉及到了哪些位置编号

    1. select distinct location_id
    2. from departments;

    五、经典面试题:
    试问:select from employees和select from employees where commission_pct like ‘%%’ and last_name like ‘%%’;结果是否一样?并说明原因

    不一样,如果判断的字段有null值就不一样,like’%%’不包含null