title: android sqlite deleting record being lined as foreign key with another record
body: <p>I have the following tables in my sqlite android database:</p>
  
  <pre><code>CREATE TABLE MAIN (
  _ID INTEGER PRIMARY KEY ASC AUTOINCREMENT,
  NAME TEXT,
  .....
  CURRENT_CARD INTEGER
  FOREIGN KEY (CURRENT_CARD) REFERENCES CARD (_ID));
  
  CREATE TABLE CARD (
  _ID INTEGER PRIMARY KEY ASC AUTOINCREMENT,
  .....
  </code></pre>
  
  <p>Now I want to delete records from my CARD table in the following way:</p>
  
  <pre><code>DELETE FROM CARD WHERE _ID IN (10,11,12,...);
  </code></pre>
  
  <p>Everything works ok until I have the record in Card table being linked to Main table, ex. let's admit that Card with id 11 has the corresponding record in Main table. When deleting Card 11 I would like to set the corresponding CURRENT_CARD field for record ex. 1 in MAIN as null (I don't want to delete the whole record in MAIN, just to null one column).</p>
  
  <p>How to do that in the easiest way? If possible as one sql statement...</p>