
Oracle数据库
Mytassel
我不偷井盖.....
展开
-
同一张表中的树形查询
Oracle数据库中,一张表中存储树形结构数据时的查询.1.从父节点往下查找select * from table start with id=? connect by priot id=parent_id其中start with 与 connect by 为关键字.2.从当前子节点往上查找select * from table start with id=? connect by prior p...原创 2018-04-09 17:02:17 · 951 阅读 · 1 评论 -
Oracle数据库统计字符串中某个字符的次数
select length(regexp_replace(replace('13801158313,13501146313,13910080420,13910017737,13910074667,13910928630,13811989476,13501360706,13811446392', ',', '|'), '[^|]+', '')) + 1 as COUNT from dual;统计...原创 2018-05-08 17:47:02 · 8599 阅读 · 0 评论