Re: Recursive select - Mailing list pgsql-sql

From Esteban Gutierrez Abarzua
Subject Re: Recursive select
Date
Msg-id Pine.LNX.4.21.0110291553300.26574-100000@sauce.chillan.ubiobio.cl
Whole thread Raw
In response to Recursive select  ("Jason Kwok" <jason@newhonest.com>)
List pgsql-sql
On Fri, 26 Oct 2001, Jason Kwok wrote:

> I have a table :
> 
> MyID           parentID
> ================
> 5                    6
> 6                    7
> 3                    13
> 7                    3
> 
> Is there any simple select statement that can get all rows with MyID = 5 and
> all its parents?
> That means 5's parenet is 6, 6's parent is 7, 7's parent is 3.....
> 
> 
> Jason
> 
I think that this is not possible.

You may do it using sql embedded or jdbc!


bye.



pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Deletion Recursively
Next
From: "Josh Berkus"
Date:
Subject: Re: PostgreSQL, Java & JDBC