title: SQL query to check if column includes some data
body: <p>I need to select all free rooms from <code>hotel</code> DB and I think I can do it with two steps:</p>
  
  <ol>
  <li><code>bookings = select * from booking where booking.startDate&gt;=selectedStartDate and booking.endDate=&lt;selectedEndDate</code>.</li>
  <li>pseudo query: <code>select * from room where room.room_id not includes bookings.room_id</code>.</li>
  </ol>
  
  <p>I wrote my second query like pseudo query because I can't find how I can do what I want to do. How to check that <code>bookings</code> doesn't includes <code>room_id</code>'s?</p>
  
  <p>My booking table looks like:</p>
  
  <pre><code>+-----------+------------+------------+---------+---------+
  | bookingId | startDate  | endDate    | room_id | guestId |
  +-----------+------------+------------+---------+---------+
  |         1 | 2016-03-12 | 2016-03-22 |       1 |       1 |
  |         2 | 2016-03-12 | 2016-03-22 |       2 |       2 |
  +-----------+------------+------------+---------+---------+
  </code></pre>