🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #17305

Re: sql vraagje

#17305
From: FnH
Date: Sun, 09 Jan 2000 00:00
30 lines
2073 bytes
> > 2. werk met tabel-aliasen.
> >    (zoiets als:
> >     SELECT TABLE1.ID
> >     FROM TABLE AS TABLE1, TABLE AS TABLE2
> >     WHERE  (TABLE1.ID = TABLE2.ID)
> >       AND  (TABLE1.type = 1 AND TABLE1.waarde = "eerste")
> >       AND  (TABLE2.type = 2 AND TABLE2.waarde = "tweede")
> >    )
> > 3. werk met een geneste subquery (ineffici�nt).
> >     SELECT ID
> >     FROM TABLE
> >     WHERE (type = 1 AND waarde = "eerste") AND
> >           ID IN
> >              SELECT ID FROM TABLE
> >              WHERE type = 2 AND waarde = "tweede"
> >
> > Nota's:
> > 1. Het zou kunnen dat hier een paar syntax-fouten instaan.
> > 2. Ik denk niet dat MySQL die twee vormen laatste ondersteund.
>
> euhm.. hier geraak ik ni echt wijs uit... bedoelt ge dat mysql die 2
> laatsten niet ondersteunt? (zodat ik dus toch geen [zij het trage]
> oplossing heb)

Ik denk dat MySQL beide vormen wel aankan (of toch op zijn minst oplossing
2). Mocht dit toch niet gaan, probeer dan eens een andere database :)
(postgresql ofzo ...)
Laat ons weten hoe het afgelopen is!

FnH
Technical Details
Message-ID: <4F4e4.2569$SC2.23916@afrodite.telenet-ops.be>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3873800B.CE8DB5BE@linuxfreak.com> <387382DE.95EA1484@co.and.co> <3873898A.B94BA56E@linuxfreak.com> <38738B1A.FCD7C056@co.and.co> <38738B31.57FF9425@linuxfreak.com> <38738CD3.8878F89C@co.and.co> <387393B9.FC892506@linuxfreak.com> <38739698.5B8A5570@co.and.co> <3873A908.8D2AB38A@linuxfreak.com> <3873AEE7.3F8BAD3A@co.and.co> <3873B456.6CF9D6C9@linuxfreak.com>

Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII
X-Google-Thread: fcea4,adf63b3fcd32c9b4
X-Google-Attributes: gidfcea4,public
From: "FnH" <Smartie@dma.be>
Subject: Re: sql vraagje
Date: 2000/01/09
Message-ID: <4F4e4.2569$SC2.23916@afrodite.telenet-ops.be>
X-Deja-AN: 570437460
References: <3873800B.CE8DB5BE@linuxfreak.com> <387382DE.95EA1484@co.and.co> <3873898A.B94BA56E@linuxfreak.com> <38738B1A.FCD7C056@co.and.co> <38738B31.57FF9425@linuxfreak.com> <38738CD3.8878F89C@co.and.co> <387393B9.FC892506@linuxfreak.com> <38739698.5B8A5570@co.and.co> <3873A908.8D2AB38A@linuxfreak.com> <3873AEE7.3F8BAD3A@co.and.co> <3873B456.6CF9D6C9@linuxfreak.com>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
X-Complaints-To: abuse@pandora.be
X-Trace: afrodite.telenet-ops.be 947443392 212.123.4.85 (Sun, 09 Jan 2000 19:43:12 MET)
Organization: FnH Productions
X-MSMail-Priority: Normal
NNTP-Posting-Date: Sun, 09 Jan 2000 19:43:12 MET
Newsgroups: be.comp.programming