Re: SQL equivalent to nested loop

From: KÖPFERL Robert <robert(dot)koepferl(at)sonorys(dot)at>
To: "'Markus Bertheau ?'" <twanger(at)bluetwanger(dot)de>, pgsql-sql(at)postgresql(dot)org
Subject: Re: SQL equivalent to nested loop
Date: 2005-06-06 18:08:07
Message-ID: ED4E30DD9C43D5118DFB00508BBBA76EB16744@neptun.sonorys.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

This is basicly a Join, a cross table

i.e.

select b.w from table a, table b where ...

|-----Original Message-----
|From: twanger(at)bluetwanger(dot)de [mailto:twanger(at)bluetwanger(dot)de]
|Sent: Montag, 06. Juni 2005 18:53
|To: pgsql-sql(at)postgresql(dot)org
|Subject: [SQL] SQL equivalent to nested loop
|
|
|Hi,
|
|I basically need the SQL equivalent of the following pseudo code:
|
|BEGIN
|FOR v IN SELECT * FROM f(4, 'foo') LOOP
| FOR w IN SELECT * FROM f(v.id, 'bar') LOOP
| RETURN NEXT W
| END LOOP;
|END LOOP;
|RETURN;
|
|Is that possible in SQL?
|
|Markus
|
|--
|Markus Bertheau ☭ <twanger(at)bluetwanger(dot)de>
|
|
|---------------------------(end of
|broadcast)---------------------------
|TIP 7: don't forget to increase your free space map settings
|

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Markus Bertheau 2005-06-06 23:16:52 Re: SQL equivalent to nested loop
Previous Message ON.KG 2005-06-06 17:02:13 Re: What is faster?