這是更好的表現明智,沒有錯誤原因刪除android中的sqlite表中的所有行。刪除所有查詢或丟棄查詢
DELETE查詢或DROP TABLE和重新生成表
我發現這個從這個post
it is more efficient to drop table and re-create it; and yes, You can use "IF EXISTS" in this case
DELETE FROM will cause SQLite to visit individual rows unless those rows have triggers, so it's generally reasonably efficient.
edited after 1 answer post
As the Droping the table using drop table query then internally delete query was used? As in one answer post
是鏈接。 它說: SQLite的默認構建,如果DELETE語句沒有WHERE子句並在沒有觸發器的表上操作,則會發生優化,通過刪除和重新創建表導致DELETE發生。刪除和重新創建表格通常比逐行刪除表格內容要快得多。這是「截斷優化」。 –