Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA36019 for ; Mon, 2 Aug 1999 10:07:24 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id KAA02930; Mon, 2 Aug 1999 10:06:14 -0400 (EDT) To: Christian Rudow cc: PostgreSQL SQL Subject: Re: [SQL] Using Aliases in Select In-reply-to: Your message of Mon, 02 Aug 1999 15:22:36 +0200 <37A59B9C.79D5C4FB@thinx.ch> Date: Mon, 02 Aug 1999 10:06:13 -0400 Message-ID: <2928.933602773@sss.pgh.pa.us> From: Tom Lane Christian Rudow writes: > select tab1.name, tab1.mytext text1, tab2.mytext text2 > from tab1, tab2 > where tab1.tab1_id = tab2.tab1_id > ERROR: Column 'mytext' is ambiguous As Oleg points out, you need to write AS text1 and so forth. The AS is not optional when labeling output columns, even though you are allowed to leave it out in the FROM list. But I am wondering about the error message --- all the Postgres versions that I have say ERROR: parser: parse error at or near "text1" which may not be too helpful but at least it's not outright misleading. What version are you using? regards, tom lane