title: sqlite query using foreign keys
body: <p>Help a sqlite n00b out, please. </p>
  
  <p>I have two tables </p>
  
  <pre><code>   "CREATE TABLE students (" +
            "_id       INTEGER PRIMARY KEY AUTOINCREMENT," +
            "studentname      TEXT not null," +
            "studentpic       BLOB," +
            "comment          TEXT);";
  </code></pre>
  
  <p>and</p>
  
  <pre><code>   "CREATE TABLE classes (" +
             "_id              INTEGER PRIMARY KEY AUTOINCREMENT," +
             "classname        TEXT," +
             "attend           INTEGER," +
             "late             INTEGER," +
             "dtime            TEXT," +
             "student          INTEGER REFERENCES students(_id) on
                               UPDATE CASCADE);";
  </code></pre>
  
  <p>I want to display a list of students in particular class, but my classes table only reference them by student-id, how can I construct a query to pull back into a single cursor all the fields of 'classes' table but use the actual names from 'students' table ?</p>
  
  <p>Many thanks in advance</p>