android sqlite 返回插入的id

        Cursor cur=db.rawQuery("select LAST_INSERT_ROWID() ",null);
        cur.moveToFirst();
        int id = cur.getInt(0);

 

 

posted @ 2014-02-11 21:27  ggaaooppeenngg  阅读(738)  评论(0编辑  收藏  举报