Re: A tricky sql-query... - Mailing list pgsql-sql

From Rod Taylor
Subject Re: A tricky sql-query...
Date
Msg-id 1067823313.571.95.camel@jester
Whole thread Raw
In response to Re: A tricky sql-query...  (Mark Stosberg <mark@summersault.com>)
List pgsql-sql
On Sun, 2003-11-02 at 19:42, Mark Stosberg wrote:
> On 2003-10-22, Timo <siroco@suomi24.fi> wrote:
> >
> > You can't have any recursion in an pure sql-query, can you?
>
> It depends on how you think of recursion, I'd say. You join on the same
> table a number of times, by giving it a different alias each time. You
> have to manually specify (or generate with application code) all these
> aliases and joins, though. Sometimes people use this technique to
> implement tree structures in SQL.

Not to mention the WITH .. RECURSIVE clause, not yet in PostgreSQL.


pgsql-sql by date:

Previous
From: Mark Stosberg
Date:
Subject: Re: A tricky sql-query...
Next
From: Christopher Browne
Date:
Subject: Re: A tricky sql-query...