开发者

Deleting all the values in a table

In an iPhone application, is it possible to delete all the values in a table through sqlite? If so, what is the query for开发者_运维问答 it? Please help me out.


Assuming it uses standard SQL, that would simply be:

delete from MYTABLE

where MYTABLE is the name of the table you want to clear. I know with SQLite3 on the desktop you can also run a vacuum operation afterwards to compact the database. Whether that's available on the iPhone, I can't say, but you should investigate it since the delete doesn't necessarily free up any space.


A quick DELETE FROM tablename should do it

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜