开发者

how to delete all the rows in the table which has name equals to myname

开发者 https://www.devze.com 2023-03-15 01:27 出处:网络
I have t开发者_高级运维he below code. Does this delete all the rows having name = myname? return mDb.delete(DATABASE_TABLE, NAME + \"=?\", new String[] { 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

精彩评论

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