Re: Recursive select

From: Esteban Gutierrez Abarzua <esgutier(at)sauce(dot)chillan(dot)ubiobio(dot)cl>
To: Jason Kwok <jason(at)newhonest(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Recursive select
Date: 2001-10-29 18:57:37
Message-ID: Pine.LNX.4.21.0110291553300.26574-100000@sauce.chillan.ubiobio.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Greg Sabino Mullane 2001-10-29 19:44:35 Re: Recursive select
Previous Message Josh Berkus 2001-10-29 18:30:23 Re: PostgreSQL, Java & JDBC