转自:http://www.blogjava.net/xzclog/archive/2010/03/05/314642.html,多谢博主分享 Oracle中start with…connect by prior子句用法 connect by 是结构化查询中用到的,其基本语法是: select … from tablename start with 条件1 connect by 条件2 where 条件3; 例: select * from table start with org_id = ‘…
connect by 是结构化查询中用到的,基本语法是:select … from tablenamestart with 条件1connect by 条件2where 条件3; 例:select * from tablestart with org_id = ‘ghf’connect by prior org_id = parent_id; 简单说来是将一个树状结构存储在一张表里,比如一个表中存在两个字段:org_id,parent_id那么通过表示每一条记录的parent是谁,就可以形成一个…
START WITH ... CONNECT BY ...子句是结构化查询中用到的,其基本语法是: select … from tablename start with 条件1 connect by 条件2 where 条件3; 例: select * from table start with org_id = 'zgs' connect by prior org_id = parent_id; 即,我们将数据以树状结构形式存储在一张表里,比如一个表中存在两个字段:org_id,parent_…
connect by 是结构化查询中用到的,其基本语法是:select … from tablenamestart with 条件1connect by 条件2where 条件3;例:select * from tablestart with org_id = ‘HBHqfWGWPy’connect by prior org_id = parent_id; 简单说来是将一个树状结构存储在一张表里,比如一个表中存在两个字段:org_id,parent_id那么通过表示每一条记录的parent是谁,…