I have this table:

CREATE TABLE DAG(
  firstID NUMBER,
  secondID NUMBER,
);

What is this code doing?

有帮助吗?

解决方案

It's finding all the direct and indirect descendants of each ancestor.

SQLFiddle here.

Share and enjoy.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top