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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: Why *no* ambig·uous complain in select part?


  • From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
  • To: emilu(at)encs(dot)concordia(dot)ca
  • Cc: pgsql-sql(at)postgresql(dot)org
  • Subject: Re: Why *no* ambig·uous complain in select part?
  • Date: Fri, 22 Aug 2008 18:41:30 -0400
  • Message-id: <19969.1219444890@sss.pgh.pa.us> <text/plain>

Emi Lu <emilu(at)encs(dot)concordia(dot)ca> writes:
> Just notice one small thing, and need your information about select

> select col1, col2
> from table1
> left join table2
> using (col1, col2)
> ;

> This query never complain about ambiguous columns of col1 and col2 in 
> the select part.

That's because you used USING, which merges the similarly-named columns
into just one output column.  RTFM, or any SQL book.

			regards, tom lane



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group