title: Selecting primary keys that do not have foreign keys in another table
body: <p>For simplification, I have two tables related with one to many using a foreign key, for example:</p>
  
  <pre><code>Users table:
  id
  name
  
  Actions table:
  id
  user_id
  </code></pre>
  
  <p>one user may have many actions or not. I need an sql select that returns users ids that don't have a user_id value in the actions table.</p>
  
  <pre><code>Users Table:
  id      name
  1       John
  2       Smith
  3       Alice
  
  Actions Table:
  id      user_id
  1       3
  2       1
  </code></pre>
  
  <p>So I need an sql query that returns the user id 2 (Smith) because the foreign key values don't include the id 2 </p>
  
  <p>I tried the following SQL, but it returns all users ids:</p>
  
  <pre><code>SELECT users.id from users left join actions on actions.user_id is null
  </code></pre>