Re: Query combining columns

From: Nabil Sayegh <postgresql(at)e-trolley(dot)de>
To: phil campaigne <pcampaigne(at)charter(dot)net>
Cc: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Query combining columns
Date: 2003-07-08 11:19:19
Message-ID: 1057663158.8371.2.camel@billy
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Am Mon, 2003-07-07 um 21.04 schrieb phil campaigne:
> Hi All,
> Can I combine 2 columns as a single column in a select statement?
> i.e. select value_1, value_2, (value_2 + value_2) from table;

Concatenating 2 Strings is done with ||
SELECT 'foo' || ' bar';
'foo bar'

The result is simply 1 string, ie. you can handle it like any other
column.

HTH
--
e-Trolley Sayegh & John, Nabil Sayegh
Tel.: 0700 etrolley /// 0700 38765539
Fax.: +49 69 8299381-8
PGP : http://www.e-trolley.de

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message scott.marlowe 2003-07-08 15:26:34 Re: Extreme high load averages
Previous Message Wim 2003-07-08 10:53:55 Re: UNSUBSCRIBE