Reuse of Subselects

From: Holger Marzen <holger(at)marzen(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Reuse of Subselects
Date: 2004-02-17 12:02:43
Message-ID: Pine.LNX.4.58.0402171259380.22598@bluebell.marzen.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

if I have something like this:

SELECT column1,
(... complicated subselect ...),
column1 - (... same subselect as above ...)
FROM table1;

do I really have to rewrite the subselect a 2nd time if I need that
result in another column's expression?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2004-02-17 12:22:19 Re: Reuse of Subselects
Previous Message pativo 2004-02-17 11:46:53 String manipulation