Re: SQL dotat - rozdil tabulek

From: Petr Pokorny <mail (zavinac)>
Date: 07. 03. 2004, 18:19 CET
Michal Bilcik <krutohlav@host.sk>:

> A co ked bude tabulka "druha" takato:
>
> id  druh
> ---------
> 1   jablko
> 2   hruska
> 3   rybiz
> 4   rybiz
> 5   rybiz
>
> ??

To me nenapadlo, ale ona nikdy nebude. Teda nemela by byt ;o) Jedna se o
jedinecny hash, takze tahle situace by nastat nemela.

> Ak raz:
>
> SELECT b.druh FROM druha AS b LEFT JOIN prvni AS a ON a.druh = b.druh
> WHERE a.druh IS NULL GROUP BY a.druh

Funguje.

> Ak vsetky vyskyty:
>
> SELECT b.druh FROM druha AS b LEFT JOIN prvni AS a ON a.druh = b.druh
> WHERE a.druh IS NULL

Funguje.

Presne to jsem potreboval, diky.

-pp21-
Received on Sun, 7 Mar 2004 18:19:12 +0100

This archive was generated by hypermail 2.1.8 : 07. 03. 2004, 18:19 CET