mod就是取余
select e.name d.name?from emp e join dept d on e.id = d.id;
select emp.*, d.name?from emp left join tmp on emp.id = tmp.id
select emp.*, d.*?from emp right?join tmp?on emp.id = tmp.id
select * from emp where salary < 5000
union
select * from emp where age > 50;
select * from emp where dept_id = (select id from dept where name = '销售部');
select * from emp where entrydata >= (select entrydata from emp where name = '防冻呗');
select * from emp where id = (select id from dept where name = '销售部' or name = '市场部')
select * from emp where salary >= all(select min(salary) from emp where id = (select id from where name = '财务部'));
select * from emp where (salary, managerid) = (select salary, managerid from emp where name = '张无忌');
当 SET @@autocommit=0之后,所有的修改都必须再加上commit才能成功执行;
set session transaction isolation level read uncommitted