摘要: 集合操作union 并集 去除重复值 union all 也是并集 不去除重复值例:select employee_id, job_id from employeesunion allselect employee_id, job_id from job_history; select employ 阅读全文
posted @ 2017-08-01 20:24 罗汉泽 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 自链接多表链接例题找出工资大于所在部门平均工资的员工姓名。多表链接方法 先建个表然后关联查询create table avg_sal_dept as select department_id, avg(salary) avg_sal from employees where department_i 阅读全文
posted @ 2017-08-01 20:23 罗汉泽 阅读(110) 评论(0) 推荐(0) 编辑
摘要: ACIDA 原子性 不能被切割开的C 一致性I 隔离性D 持久性 只有异常终止 系统才会回轨 DML:select insert update delete(CRUD) // 查 增 改 删//DML 不会改变表的结构 DDL:create alter drop 创建 修改 删除//DDL 会改变表 阅读全文
posted @ 2017-08-01 20:23 罗汉泽 阅读(104) 评论(0) 推荐(0) 编辑