上一页 1 2 3 4 5 6 7 8 9 10 ··· 65 下一页
摘要: 阅读全文
posted @ 2023-10-20 21:26 胖豆芽 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 注重效率 阅读全文
posted @ 2023-10-20 19:54 胖豆芽 阅读(7) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/shaohuang/p/17509290.html 阅读全文
posted @ 2023-10-20 14:30 胖豆芽 阅读(2) 评论(0) 推荐(0) 编辑
摘要: select DEPTNO as '部门编号',job as '工种',max(sal) as '不同部门里不同工种的最高工资' from emp group by DEPTNO,job; 阅读全文
posted @ 2023-10-18 19:59 胖豆芽 阅读(2) 评论(0) 推荐(0) 编辑
摘要: select ename as '最高薪资人员的姓名' ,sal as '薪资' from emp where sal in(select max(sal) as '部门最高工资' from emp group by DEPTNO ); 阅读全文
posted @ 2023-10-18 19:45 胖豆芽 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2023-10-18 15:04 胖豆芽 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 1.分组函数自动处理null,忽略null 2.分组函数不能出现在where条件语句中 3.分组函数可以组合在一起使用,可以嵌套 # 分组函数不能使用在where中 # 找出最低工资的员工薪资 select * from emp where sal=(select min(SAL) from emp 阅读全文
posted @ 2023-10-18 14:18 胖豆芽 阅读(2) 评论(0) 推荐(0) 编辑
摘要: select ENAME as '姓名',SAL as '原始工资', (SAL*1.1) as '涨工资10%'from emp where job='MANAGER'; # 经理涨薪%10,销售涨薪%50 其余不变 需要使用 case when then when then else end s 阅读全文
posted @ 2023-10-18 13:53 胖豆芽 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2023-10-17 20:04 胖豆芽 阅读(10) 评论(0) 推荐(0) 编辑
摘要: select sal as '原始数据', round(sal) as '四舍五入后的数据' , round(sal,1) as '四舍五入1个小数点后的数据', round(sal,-1) as '四舍五入-1个小数点后的数据'from emp; # 生成100以内额随机整数 select rou 阅读全文
posted @ 2023-10-17 19:54 胖豆芽 阅读(1) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 65 下一页