Re: [GENERAL] query with table alias

2004-11-12 Thread Matteo Beccati
prr=# select foo.c1, f.c2 from foo f; -- >>> Incorrect result <<< The result of the "select foo.c1, f.c2 from foo f" isn't correct, it do a cartesian product of foo table. foo is aliased to f, so there's no table named foo in the from clause. By default postgres tries to add the missing table n

Re: [GENERAL] query with table alias

2004-11-12 Thread Patrick Fiche
Title: query with table alias The correct query would be "select f.c1, f.c2 from foo f;" if you want to use alias   Patrick   --- Patrick Fiche email : [EMAIL PROTECTED] tél : 01 69 29 36 18 --

Re: [GENERAL] query with table alias

2004-11-12 Thread Michael Glaesemann
On Nov 12, 2004, at 7:48 PM, Rodríguez Rodríguez, Pere wrote: prr=# select foo.c1, f.c2 from foo f;  -- >>> Incorrect result <<<  c1 | c2 +   1 |  1   2 |  1   1 |  2   2 |  2 (4 filas) If you alias a table, you can only reference the table using the alias. It is in effect renamed: foo is