![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据库
asdwjb
这个作者很懒,什么都没留下…
展开
-
start with connect by level 实现树
具体的sql为 select level treelevel, eva.state, t.id, case when t.parentid is null then '' else t.parentid || '' end parentid, ...2011-12-16 17:57:00 · 211 阅读 · 0 评论 -
查询所有子表
[size=large]很多公司数据库建模都很不好,表关系图很不完善,删除数据和了解业务很不方便,没办法,每次都得用下面这条语句查出我关心的这张表有哪些子表: [color=red]注意主表名必须是大写的[/color] select a.table_name ,a.column_name ,b.table_name ,b.column_name from (select a.con...原创 2012-06-18 10:16:12 · 150 阅读 · 0 评论