From: Ken J. Wright <ken@ori-ind.com>
To: Phillip Rhodes <rhodespc@bellatlantic.net>
To: 'pgsql-interfaces@postgreSQL.org' <pgsql-interfaces@postgreSQL.org>
Subject: Re: [INTERFACES] jdbc question
Date: Wed, 09 Feb 2000 15:17:31 -0800
Message-ID: <3.0.1.32.20000209151731.02096c70@ori-ind.com> (raw)
In-Reply-To: <01BF7315.59104850.rhodespc@bellatlantic.net>
At 15:50 02/09/2000 -0000, Phillip Rhodes wrote:
>If I submit a query joining two tables with identical column names, how can
>I differentiate the different columns and get the correct values?
>
>table test1
>(col1 INTEGER,
>col2 INTEGER)
>
>table test2
>(col1 INTEGER,
>col2 INTEGER)
>
>
>select * from test1, test2
>where test1.col1 = test2.col1
select a.*, b.col1 as col3, b.col2 as col4 from test1 a, test2 b
where a.col1 = b.col1
>The call
>rs.getInt("col1") returns successfully with a value, but there are 2 col1
>columns in the resultset.
>
>Thanks,
>Phillip
>
>
>************
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: ken@ori-ind.com, rhodespc@bellatlantic.net
Subject: Re: [INTERFACES] jdbc question
In-Reply-To: <3.0.1.32.20000209151731.02096c70@ori-ind.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox