我开始使用sql,并且我面对分层查询。同时我成功选择connect by prior命令行但未能更新。这里是我的更新查询: update HTABLE set status = 'INACTIVE'
WHERE STATUS <> 'CLOSE'
Connect by prior PARENT_ID=ID start with PARENT_ID=12345;
我SQL E
获取使用连接树的最高层部分,我有以下表格: CREATE TABLE Z_BOM2 (A VARCHAR2(4 CHAR), B VARCHAR2(4 CHAR));
Insert into Z_BOM2 (A, B) Values ('A', 'B');
Insert into Z_BOM2 (A, B) Values ('A', 'C');
Insert into Z_BOM2 (A,
我有一个分层数据如下的表格。 create table tst as
select 1 id, null parent_id from dual union all
select 2 id, 1 parent_id from dual union all
select 3 id, 1 parent_id from dual union all
select 4 id, 2 parent_i