Matt Quackenbush wrote:
> I just read through Chapter 7 of the PostgreSQL docs (
> http://www.postgresql.org/docs/8.2/static/queries.html) regarding queries,
> and could find no examples or mention of a sub-query used in the select
> list.

<quote>
7.3.1. Select-List Items

The simplest kind of select list is * which emits all columns that the table 
expression produces. Otherwise, a select list is a comma-separated list of 
value expressions (as defined in Section 4.2).
</quote>
And if you follow that link to section 4.2 of the manual:
<quote>
4.2. Value Expressions
(..)
A value expression is one of the following:
(..)
    * A scalar subquery.
    * Another value expression in parentheses, useful to group subexpressions 
and override precedence.
</quote>

Yes, you can use a subquery in the select list.

Jochem

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266115
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to