How to truncate table in sqlite in android [closed]
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this questi开发者_Go百科onI am new in android. Can anyone help me to hows truncate table in sqlite in android.. Can anyone give me example of that delete table? Please help me.
What do you want to do? If you want to truncate the table (delete all data) you can use the DELETE
query without a where condition. If you want to delete the entire table you can use a DROP TABLE
query
It is the two step process:
First delete all data from that table using this:
Delete from TableName
Second step:
DELETE FROM SQLITE_SEQUENCE WHERE name='TableName';
精彩评论