[linux] OT: pomoc s sql prikazom ...

Kamil Choma choma na fmph.uniba.sk
Čtvrtek Srpen 16 00:28:24 CEST 2001


ano aj toto by malo ist ale skus napr.:
select a.meno from tabulka a, tabulka b where a.meno=b.meno and
a.jedlo='maslo' and b.jedlo='chlieb';
subselecty su vo vseobecnosti pomalsie ako joiny (tomuto konretne sa
tusim hovori selfjoin).
Kamil

Oskar Stolc wrote:

> > >
> > > To nie je dobre, lebo mi vrati aj takych ludi, co jedli len
> > > 'maslo' bez 'chlaba' alebo 'chlieb' bez 'masla'. A ja chcem len
> > > takych, ktory jedli sucasne 'chlieb' aj s 'maslom'
> >
> > select j.meno from tabulka j, tabulka p where p.jedlo='maslo' and
> > j.jedlo='chlieb';
> >
>
> zrejme si myslel na toto:
>
> select meno from aaa where jedlo = 'chlieb' and meno in (select
> meno from aaa where jedlo = 'maslo');
>
> > Potrebujes spravit join z dvoch tabuliek.
> >
> >
> >     Juraj.
> >
>
> _______________________________________________
> http://lists.linux.sk/listinfo/linux
> http://search.lists.linux.sk

--
choma na fmph.uniba.sk






Další informace o konferenci linux