title: Select NOT IN from a predefined list
body: <p>For simplicity, suppose I have a table <code>transactions</code> with <code>id</code> as the primary key.  Currently there are only 10 rows in the table with id from 1 to 10.</p>
  
  <p>I have a list of ids: {9,10,<strong>11</strong>,<strong>12</strong>}.  This list is not stored in the database.</p>
  
  <p>I want to query the database for the ids not in the <code>transactions</code> table.  In the case above I want to get 11, 12.</p>
  
  <p>What's the best way to way to write this query?</p>
  
  <p>Currently I just query <code>SELECT * FROM transactions WHERE id IN (9,10,11,12)</code>.  And do my intersection in code.  I'm wondering is I can do it all in one step in SQL.</p>