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

From Mark Stosberg
Subject Re: A tricky sql-query...
Date
Msg-id slrnbqb94a.2417.mark@tanagra.summersault.com
Whole thread Raw
In response to A tricky sql-query...  ("Timo" <siroco@suomi24.fi>)
Responses Re: A tricky sql-query...  (Rod Taylor <rbt@rbt.ca>)
List pgsql-sql
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.  
Mark

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



pgsql-sql by date:

Previous
From: "Ganesan Kanavathy"
Date:
Subject: Re: [ADMIN] pgAdmin
Next
From: Rod Taylor
Date:
Subject: Re: A tricky sql-query...