| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: transitive closure of a graph
Mikito Harakiri wrote:
> Mikito Harakiri wrote:
>
>>Transitive closure (TC) of a graph is >> >>with TransClosedEdges (tail, head) as >>( select tail, head from Edges >> union all >> select e.tail, ee.head from Edges e, TransClosedEdges ee >> where e.head = ee.tail >>) >>select distinct * from TransClosedEdges >> >>except that this query might never terminate.
Cheers
Serge
-- Serge Rielau DB2 SQL Compiler Development IBM Toronto LabReceived on Wed Oct 12 2005 - 06:23:13 CDT
![]() |
![]() |