?????????????????????????????
?????????????????API???????

 

ContentValues cv=new ContentValues();
//cv.put("id"??1);    //id??????   ????????   ????????
cv.put("name"??"???");
cv.put("age"??"27");
db.insert("mytable"??null??cv);
db.close();

??????????????????????
????db.execSQL("insert into mytable(name??age) values(????)"??new Object[]{"???"??"27"});
????db.close();
?????????????????
??????????????????
????????????
????db.execSQL("delete from mytable where id=2");   //???id=2???????
????db.execSQL("delete from mytable where name=?"?? new Object[]{"???"});  //??????????name=??????????
????????????
????db.delete("mytable"??null??null);  //?????????????е?????
????db.delete("mytable"??"id=?"??new String[]{"2"}); //????????mytable????? id=2???????
??????????????????
????????????
????db.execSQL("update mytable set name='??'??age='23' where id=2");  //?????idλ ????  ???????
????//db.execSQL("update mytable set name='????·'??age='25' where name=?"??new Object[]{"???"});
????????????

 

ContentValues cv=new ContentValues();
cv.put("name"??"???");
cv.put("age"??"21");
db.update("mytable"??cv??"id=?"??new String[]{"5"});

????????????

 

Cursor cursor=db.query("mytable"??new String[]{"id"??"name"??"age"}??null??null??null??null??null);
while(cursor.moveToNext())   //????????
{
int idindex=cursor.getColumnIndex("id");
int id=cursor.getInt(idindex);
int nameindex=cursor.getColumnIndex("name");
String name=cursor.getString(nameindex);
int ageindex=cursor.getColumnIndex("age");
String age=cursor.getString(ageindex);
String result=id+"  "+name+"  "+age;
Log.i("result"??result);  //??????
}

????????????????
???????ж?????????????
????db.close();