views:

118

answers:

1

can we use truncate query in android database? otherwise can we performing truncate operation using our java code?

A: 

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.
WarrenFaith
there is no other way?
Kandhasamy