oracle 分页查询
摘要:rownum的使用 1第一个查询中,rownum只能使用5;--分页查询 select * from (select a1.*,rownum rn from (select * from student) a1 where rownum =6;--分页查询二sele...
阅读全文
posted @
2017-06-11 12:26
2637282556
阅读(88)
推荐(0)
关联子查询+嵌套子查询
摘要:关联子查询 定义 1引用外部的一列或多列 2将外部查询的每一行都传递给子查询,子查询依次读取传递过来的每一行的值,并将其使用到子查询上,直到外部查询的所有行都处理完为止,然后返回子查询的结果获取员工工资低于所在部门的平均工资的员工信息 select empno,en...
阅读全文
posted @
2017-05-21 17:07
2637282556
阅读(207)
推荐(0)
子查询+in+exists/not exists+all+any+多列子查询
摘要:子查询: 将查询语句作为外部sql的条件 注意 1子查询不能使用order by 2多行子查询可以返回多行记录,外部要使用多行操作符(In,exists,any ,all… )where 或者 having +in ,not in,>,(select …) havin...
阅读全文
posted @
2017-04-25 16:08
2637282556
阅读(233)
推荐(0)