
数据库
onedegree
学无止境
展开
-
Oracle学习笔记
union all和union的区别 都是对两个结果集进行并集操作 union all:包含重复的结果,不排序结果 union:不包括重复结果,排序结果 order by子句必须写在最后一个结果集里,并且其排序规则将改变操作后的排序结果 Oracle中start with…connect by prior子句用法 select … from tablename start with 条件1 connect by PRIOR 条件2 where 条件3; 条件1表示数据的切入点,也就是第一条数据从..原创 2021-10-08 16:42:20 · 134 阅读 · 0 评论 -
Oracle的递归算法——start with...connect by prior子句用法
start with connect by prior 递归查询用法 ```sql create table a_test ( parentid varchar2(10), subid varchar2(10)); insert into a_test values ( '1', '2' ); insert into a_test values ( '1', '3' ); insert into a_test values ( '2', '4' ); insert into a_test va原创 2021-08-25 17:36:21 · 369 阅读 · 0 评论