如何选择mysql现有和非现有关节?

时间:2015-05-04 10:45:50

标签: mysql

我跟随sql

SELECT nom, prénom, photo_user, titre_pub, date_pub, COUNT( id_com ) as ncm , photo, texte, nbr_vu,p.id_user
FROM user u, publication p, photo ph, texte t, commentaire c
WHERE c.id_pub = p.id_pub
AND u.id_user = p.id_user
AND p.id_photo = ph.id_photo
AND p.id_texte = t.id_texte
GROUP BY (p.id_pub) ");

我希望sql命令选择WHERE c.id_pub = p.id_pub为true并且还选择何时为false help plz

0 个答案:

没有答案