pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Phillip Rhodes <rhodespc@bellatlantic.net>
To: 'pgsql-interfaces@postgreSQL.org' <pgsql-interfaces@postgreSQL.org>
Subject: jdbc question
Date: Wed, 9 Feb 2000 15:50:10 -0000
Message-ID: <01BF7315.59104850.rhodespc@bellatlantic.net> (raw)

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

The call
rs.getInt("col1") returns successfully with a value, but there are 2 col1 
columns in the resultset.

Thanks,
Phillip




view thread (7+ messages)  latest in thread

Message-ID: <01BF7315.59104850.rhodespc@bellatlantic.net>
Permalink:  ../01BF7315.59104850.rhodespc@bellatlantic.net/
Also on:    postgresql.org/message-id/01BF7315.59104850.rhodespc@bellatlantic.net

 · 

reply

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: rhodespc@bellatlantic.net
  Subject: Re: jdbc question
  In-Reply-To: <01BF7315.59104850.rhodespc@bellatlantic.net>

* 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