sqliteDatabase demosqlite = this.openOrCreateDatabase("sqllite_demo.db",Context.MODE_PRIVATE,null); //String sql = "Create table test1(id int)"; // for(int i = 0;i<10;i++){ // String sql = "insert into test1(id) values("+i+")"; // demosqlite.execsql(sql); // } // Cursor cursor = demosqlite.rawQuery("select * from test1",null); int i = 0; if(cursor != null){ if(cursor.moveToFirst()){ do{ System.out.println(cursor.getString(0)); //i++; }while(cursor.moveToNext()); } }