开发者

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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜