can we use truncate query in android database? otherwise can we performing truncate operation using our java code?
If I have to truncate a table, I simply drop and recreate it.
Documentation ( http://www.sqlite.org/lang_delete.html ):
When the WHERE is omitted from a DELETE statement and the table being deleted has no triggers, SQLite uses an optimization to erase the entire table content without having to visit each row of the table individually. This "truncate" optimization makes the delete run much faster.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With