Re: [INTERFACES] jdbc question - Mailing list pgsql-interfaces

From Ken J. Wright
Subject Re: [INTERFACES] jdbc question
Date
Msg-id 3.0.1.32.20000209151731.02096c70@ori-ind.com
Whole thread Raw
In response to jdbc question  (Phillip Rhodes <rhodespc@bellatlantic.net>)
Responses pgAdmin on NT (NT4SP6)  (Tomaz Borstnar <tomaz.borstnar@over.net>)
List pgsql-interfaces
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
>
>
>************
>


pgsql-interfaces by date:

Previous
From: Craig Orsinger
Date:
Subject: RE: [INTERFACES] The persistance of C functions
Next
From: Phillip Rhodes
Date:
Subject: RE: [INTERFACES] jdbc question