Re: [INTERFACES] jdbc question

From: "Ken J(dot) Wright" <ken(at)ori-ind(dot)com>
To: Phillip Rhodes <rhodespc(at)bellatlantic(dot)net>, "'pgsql-interfaces(at)postgreSQL(dot)org'" <pgsql-interfaces(at)postgreSQL(dot)org>
Subject: Re: [INTERFACES] jdbc question
Date: 2000-02-09 23:17:31
Message-ID: 3.0.1.32.20000209151731.02096c70@ori-ind.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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
>
>
>************
>

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Bryan White 2000-02-09 23:42:16 Re: [INTERFACES] The persistance of C functions
Previous Message Craig Orsinger 2000-02-09 22:19:19 RE: [INTERFACES] The persistance of C functions