Problème de jointure SQL
Fermé
equinette
Messages postés
11
Date d'inscription
mercredi 11 avril 2007
Statut
Membre
Dernière intervention
21 avril 2008
-
7 août 2007 à 10:05
youlien Messages postés 18 Date d'inscription lundi 21 mai 2007 Statut Membre Dernière intervention 8 août 2007 - 7 août 2007 à 10:17
youlien Messages postés 18 Date d'inscription lundi 21 mai 2007 Statut Membre Dernière intervention 8 août 2007 - 7 août 2007 à 10:17
A voir également:
- Problème de jointure SQL
- Blob sql ✓ - Forum Webmastering
- Sql (+) - Forum Programmation
- Delete sql jointure ✓ - Forum Bases de données
- Sql commence par ✓ - Forum Webmastering
- Sequence sql - Astuces et Solutions
1 réponse
youlien
Messages postés
18
Date d'inscription
lundi 21 mai 2007
Statut
Membre
Dernière intervention
8 août 2007
4
7 août 2007 à 10:17
7 août 2007 à 10:17
select produit,..........,photo
from produit,photo
where produit.pdt_id=photo.pdt_id
and photo.ordre = (select min(photo2.ordre) from photo2 where produit.pdt_id=photo2.pdt_id).
ou plus facilement avec un group by et un having si tu connais !
from produit,photo
where produit.pdt_id=photo.pdt_id
and photo.ordre = (select min(photo2.ordre) from photo2 where produit.pdt_id=photo2.pdt_id).
ou plus facilement avec un group by et un having si tu connais !