摘要: 1. 去重(distinct) (1)去除重复的职业 select distinct job from emp; (2)所有字段都去重,distinct只能出现在所有字段最前面 select distinct deptno,job from emp; distinct和deptno拼接后去重 (3) 阅读全文
posted @ 2021-07-04 21:42 homle 阅读(63) 评论(0) 推荐(0) 编辑
摘要: 1. 三张表介绍 员工表 emp: 部门表 dept: 薪资等级表 salgrade: 2. 简单查询 (1)查看员工表结构: desc emp; (2)查询emp表中的一个字段: select empno from emp; (3)查询表中多个字段,使用,(逗号)分割: select empno, 阅读全文
posted @ 2021-07-04 18:37 homle 阅读(213) 评论(0) 推荐(0) 编辑