On 09 Dec 2003 23:00:29 +0100, Christoffer Olsen
<christofferolsen@ninja.dk> wrote:
>Er der en måde at komme uden om mit problem på?
Kig på:
http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#Rewriting_subqueries
==
The queries:
SELECT * FROM t1 WHERE id NOT IN (SELECT id FROM t2);
SELECT * FROM t1 WHERE NOT EXISTS (SELECT id FROM t2 WHERE
t1.id=t2.id);
Can be rewritten as:
SELECT table1.* FROM table1 LEFT JOIN table2 ON table1.id=table2.id
WHERE table2.id IS NULL;
==
Det burde være lidt inspiration.
--
- Peter Brodersen
Ugens sprogtip: trafik (og ikke traffik)