title: MySQL Return different value if it doesn't exist in another table
body: <p>I have <code>items</code> and <code>lists</code> tables which store items and lists respectively. I'm trying to retrieve all items in a particular list identified by <code>url</code>. <code>url</code> is a unique key in <code>lists</code>.</p>
  
  <pre><code>SELECT 
      items.item_name,
      items.position,
      items.checked,
      lists.list_name
  FROM 
      items 
  JOIN lists
  WHERE 
      items.list_id=lists.list_id AND lists.url=?
  ORDER BY items.position
  </code></pre>
  
  <p>This works, but I want to differentiate a case where      </p>
  
  <ol>
  <li><code>lists.url</code> does not exist in <code>lists</code> and </li>
  <li>it exists in <code>lists</code>, but the list does not contain any items. </li>
  </ol>
  
  <p>Currently, this query returns an empty set on both cases. What is a good way to do this in one query?</p>