how to delete all the rows in the table which has name equals to myname
I have t开发者_高级运维he below code. Does this delete all the rows having name = myname?
return mDb.delete(DATABASE_TABLE, NAME + "=?", new String[] { myname });
If not, can you help me how to achieve it
Which dbms do you use? I would try
DELETE FROM databasename WHERE name = yourname
this is in mysql, but the sql from the different dbms is very similar
should work also on sqllite
mDb.delete(DATABASE_TABLE, NAME + "=" + myName, null);
精彩评论