Oracle 查询
来源:互联网 发布:香港买mac pro 过关 编辑:程序博客网 时间:2024/05/16 08:53
nvl进行判空处理,如果money字段是空 就用0来代替
select name ,nvl(money,0),from yy;
name like ‘_ _o%’ 查找第三个字母是o的名字
查询平均薪资大于2000的部门
select avg(sal),max(sal),depton from rmp group by depton haveing avg(sal)>2000;
查询本部门高于部门平均工资的员工
select a.name,a.sal,b.mysal,b.depton from emp a ,(select depton ,avg(sal) mysal from emp group by depton) b where a.depton=b.depton and a.sal >b.mysal;
利用子查询建表 (可以同时将表里面的记录导出来)
create table mytable (id ,name) as select id,name from yy;
insert 结合子查询导数据
insert into yy(id,name) select user_id,name from user where user_id>10;
0 0
- Oracle查询
- Oracle 查询
- oracle 查询
- oracle查询
- Oracle查询
- Oracle查询
- Oracle查询
- oracle查询
- oracle查询
- Oracle查询
- oracle----------查询
- Oracle 查询
- ORACLE查询
- Oracle 查询
- oracle查询
- ORACLE查询
- oracle Oracle分页查询
- oracle 递归查询 树查询
- apache和nginx开启https
- 2016过去了 期待2017
- vim显示行号并设置tab为4个字符的命令
- iOS10适配 完美解决相机、相册等权限的使用
- React Native(五):Image的各种姿势
- Oracle 查询
- ldd 3 重定向打印开启 misc-progs
- git
- 1月2日 51 Node 1189 阶乘分数
- spring quartz配置定时任务
- NOSQL数据库浅析(三):Redis
- 10分钟详细解读android scrollview
- js数组去重
- Hibernate hql