title: SQL EXISTS Query
body: <p>I am trying to write a query to select an album from a table to which at least one artist has been assigned using the EXISTS query. </p>
  
  <p>Albums and Artists are contained in separate tables and it is possible to have albums to which no artists have been assigned, where the value returns as NULL.</p>
  
  <p>Can someone provide an example of how to go about creating this query.</p>
  
  <p>EDIT: Adding the non-working example below</p>
  
  <pre><code>SELECT artist_name FROM artist
  JOIN album ON artist.artist_id = album.artist_id
  WHERE EXISTS (SELECT album_id FROM album)
  </code></pre>
  
  <p>The query is returning the correct result, but I don't think the last line is correct because it isn't using the operation for where at least one exists, so I'm thinking there needs to be an operator in the sub-query, or something to do with a NULL value.</p>