Android, DB , SQL

Android, DB , SQL

    Cursor c;
    c = db.rawQuery(“select * from todo_table”, null);

    c.moveToFirst();
    int len=c.getCount();
    String t1=c.getString(0);

    return c;
    // select stud_no,stud_no  from   TABLE_NAME
    String col[]= {“stud_no”,”stud_name”};
    Cursor cursor3  = db.query(TABLE_NAME, col, null, null, null, null, null);

    // select * from TABLE_NAME where Id = ‘2’
    Cursor cursor2 = db.query(TABLE_NAME, null, “Id = ‘2’” , null, null, null, null);