[BUGS] using WHERE and AND in SELECT
[BUGS] using WHERE and AND in SELECT
От:
Jean-Yves MARTIN <Jean-Yves.Martin@ec-nantes.fr>
Дата:
Hi,We had an issue when writing a SELECT request : we write:select personne_id from personne inner join conducteur on (conducteur.personne_id=personne.personne_id) and personne.personne_id<20instead of:select personne_id from personne inner join conducteur on (conducteur.personne_id=personne.personne_id) where personne.personne_id<20and there is no syntax error. both give the same result.is it a bug in the SQL grammar or is it a usable syntax?regards,JY Martin.
Jean-Yves MARTIN Responsable Option Informatique Dept Informatique et Mathématiques
Centrale Nantes
1 rue de la Noë
44321 Nantes, cedex 3
FranceTel: +33 2 40 37 25 98 Mail: Jean-Yves.Martin@ec-nantes.fr
Re: [BUGS] using WHERE and AND in SELECT
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Jean-Yves MARTIN writes: > We had an issue when writing a SELECT request : we write: > select personne_id from personne inner join conducteur on (conducteur.personne_id=personne.personne_id) and personne.personne_id<20 There's no requirement for parentheses around the JOIN condition, so that's perfectly legal. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs