Re: How do I extract ONE particular field, when multiple table contain the same field name? - Mailing list pgsql-sql

From Christof Glaser
Subject Re: How do I extract ONE particular field, when multiple table contain the same field name?
Date
Msg-id 20010914211433.26D8112BF8@pinguin.gl.aser.de
Whole thread Raw
In response to How do I extract ONE particular field, when multiple table contain the same field name?  (olle.wijk@systecon.se (Olle Wijk))
List pgsql-sql
On Wednesday, 12. September 2001 11:06, Olle Wijk wrote:
> Hi,
>
> I am pretty new att using SQL-quires, could anyone help me with this
> one:
>
> I want to do the following SQL-query:
>
> Select XID, DENOM, PRICE, FRT, CTID From XItem xi, Category c Where
> xi.System=1 and xi.Category=c.Index
>
> the problem is that the field 'DENOM' is present in both table 'XItem'
> and 'Category' 

Just write: table.field or table-alias.field instead of just 'field' 
(like you did already in the WHERE clause):

Select XID, xi.DENOM, PRICE, FRT, CTID 
From XItem xi, Category c 
Where xi.System=1 and xi.Category=c.Index

Christof
--   gl.aser . software engineering . internet service      http://gl.aser.de/ . Planckstraße 7 . D-39104 Magdeburg


pgsql-sql by date:

Previous
From: Patrik Kudo
Date:
Subject: Re: Which SQL query makes it possible to optain the 3 greatest
Next
From: "Wei Weng"
Date:
Subject: Re: Which SQL query makes it possible to optain the 3 greatest values of an interger list ?