|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Problem to understand a select questionSome background we have two tables one Person and one Car. The relation is that one Person can own one or at most two cars. How should the number 198898 and 114388 be understood. What information does these two numbers give. I have a select question that looks like this SELECT COUNT(DISTINCT P.PersonID), COUNT(DISTINCT B.BilID) FROM Person P FULL OUTER JOIN Bil B ON P.PersonID = B.PersonID WHERE B.BilID IS NULL OR P.PersonID IS NULL --------------- -------------------- 198898 114388 (1 row(s) affected) Many thanks!! //Tony
Other interesting topics
|
|||||||||||||||||||||||