You are not logged in.
Pages: 1
Hi
How can I truncate a table?
regards
Offline
There are several Delete() ORM methods available, which could also be nested into a Batch + automatic transaction for best performance.
But nothing similar to a SQL truncate command.
So you need to run the SQL directly, depending on the underlying database engine.
For instance, for SQlite3 it is 'delete from tablename'.
What we usually do is to create a dedicated SQlite3 database for expandable tables.
Then deleting the file is enough to truncate the whole table in a very efficient way.
Offline
Pages: 1