title: Android composite primary key?
body: <p>Can anyone tell me how to declare a composite primary key in Android 1.6 which includes an autoincrement _id column? I'm not sure of the syntax. I've ended up just enforcing it in Java when I try to add values (where registrationNumber + date has to be unique in the table):</p>
  
  <pre><code>            Cursor fuelUpsCursor = getFuelUps(registrationNumber, date);
          if(!fuelUpsCursor.moveToNext())
          {
              //add registrationNumber and date
          }
  </code></pre>
  
  <p>I don't really need the _id column but it can make life tricky if tables don't have one.</p>
  
  <p>Cheers,
  Barry</p>