title: SQLite (Android) - Selecting Random Row
body: <p>I have a method to return a Cursor, however it unfortunately spawns a NullPointerException for some reason.</p>
  
  <p>Here's the method, is there anything wrong with it?:</p>
  
  <pre><code>public Cursor getRandom(String tableName) {
          return db.query(tableName + " Order BY RANDOM() LIMIT 1", new String[] {KEY_ID, KEY_TEXT}, null, null, null, null, null);
      }
  </code></pre>