You are here: Re: [PHP] including the result of one query in another query « PHP « IT news, forums, messages
Re: [PHP] including the result of one query in another query

Posted by Brian V Bonini on 06/26/05 14:53

On Sun, 2005-06-26 at 06:38, Pedro Quaresma de Almeida wrote:
> Hi
>
> I have two databases, on for aeromodelistas (aeromodelling) and
> another for Códigos Postais (Postal Codes). I whant to do the
> following query
>
> SELECT CódigoPostal FROM Aeromodelistas
> WHERE CódigoPostal IN
> (SELECT distinct(CP4) FROM codigopostal.LOCART,codigopostal.DISTRITO
> WHERE codigopostal.LOCART.DD=codigopostal.DISTRITO.DD
> AND codigopostal.DISTRITO.DESIG='Coimbra');


I believer DISTINCT is not an SQL function, it's a statement.

SELECT DISTINCT column_name FROM table_name;

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация