Skip site navigation (1) Skip section navigation (2)

jdbc question

From: Phillip Rhodes <rhodespc(at)bellatlantic(dot)net>
To: "'pgsql-interfaces(at)postgreSQL(dot)org'" <pgsql-interfaces(at)postgreSQL(dot)org>
Subject: jdbc question
Date: 2000-02-09 15:50:10
Message-ID: 01BF7315.59104850.rhodespc@bellatlantic.net (view raw or flat)
Thread:
Lists: pgsql-interfaces
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


Responses

pgsql-interfaces by date

Next:From: Knauer, Todd C.Date: 2000-02-09 17:37:39
Subject: Access2000
Previous:From: Ivo SimicevicDate: 2000-02-09 09:33:35
Subject: Re: [INTERFACES] destroydb and createdb

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group