List:General Discussion« Previous MessageNext Message »
From:Dathan Vance Pattishall Date:May 20 2003 8:35pm
Subject:RE: Query for data not inside a table.
View as plain text  

-->-----Original Message-----
-->From: William Hambleton [mailto:whambleton@stripped]
-->Sent: Tuesday, May 20, 2003 1:08 PM
-->To: mysql@stripped
-->Subject: Query for data not inside a table.
-->
-->I want to know who are the owners who do not own a specific type of
dog.
-->So that dog would be in Table B, but the owner would not. I can write
-->
-->select C.own_name
-->from C
-->left join B on B.own_id = c.own_id
-->left join A on A.dog_id = B.dog_id
-->where A.dog_type = "foo";
-->
-->this gives me all the owners of a particular dog, but I want to know
who
-->does not own the dog. Thoughts? MySQL 4.0 does not support IN
statements,
-->right?

WHERE b.dog_id IS NULL will give you "who does not own a dog"
Mysql 4.0 supports IN statements look it up at mysql.com



-->



Thread
Query for data not inside a table.William Hambleton20 May
  • RE: Query for data not inside a table.TheMechE20 May
  • RE: Query for data not inside a table.Dathan Vance Pattishall20 May