Re: A tricky sql-query...

From: Mark Stosberg <mark(at)summersault(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: A tricky sql-query...
Date: 2003-11-03 00:42:46
Message-ID: slrnbqb94a.2417.mark@tanagra.summersault.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 2003-10-22, Timo <siroco(at)suomi24(dot)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.

Mark

--
http://mark.stosberg.com/

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Rod Taylor 2003-11-03 01:35:13 Re: A tricky sql-query...
Previous Message alban 2003-11-02 18:21:13 7.3 : how add user when last user have lost 'createuser' option