摘要: 15、排序 15.1、查询所有员工薪资,排序? select ename,sal from emp order by sal; (默认升序) select ename,sal from emp order by sal desc; (指定降序) select ename,sal from emp o 阅读全文
posted @ 2022-01-20 22:53 doremi429 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 14、条件查询 14.1、语法格式: select 字段1,字段2,字段3..... from 表名 where 条件; 14.2、有哪些条件? 1)= 等于 查询薪资等于800的员工姓名和编号? select empno,ename from emp where sal = 800; 查询SMIT 阅读全文
posted @ 2022-01-20 20:40 doremi429 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 13、简单查询 13.1、查询一个字段? select 字段名 from 表名; 其中要注意: select和from都是关键字 字段名和表名都是标识符。 强调: 对于SQL语句说,是通用的 所有的SQL语句以“;”结尾,不区分大小写 查询部门名字: select dname from dept; 阅读全文
posted @ 2022-01-20 17:05 doremi429 阅读(1202) 评论(0) 推荐(0) 编辑