Query combining columns

From: phil campaigne <pcampaigne(at)charter(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Query combining columns
Date: 2003-07-07 19:04:29
Message-ID: 3F09C43D.3050108@charter.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

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;

If so, in java how do I get the value of the combined column out of the
result object?
I tried
checkSum = result.getInt("(value_1 + value2)");
and
checkSum=result.getInt(3);
Thanks,
Phil

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message scott.marlowe 2003-07-07 19:35:17 Re: Extreme high load averages
Previous Message Harry Broomhall 2003-07-07 17:40:52 Re: Problems with arrays