How to Truncate table in SQLite database
Jon Moffet
I found out that truncating SQLite database is a little bit different from its MySQL counterpart. Here's how to truncate SQLite database from command line
CODE:
-
sqlite your_database.db
-
sqlite> DELETE FROM some_table;
after that, dont forget to execute VACUUM to compact the database :
CODE:
-
sqlite> VACUUM;
Posted in Uncategorized |








July 7th, 2010 at 5:51 pm
This took me almost a day to figure out that “TRUNCATE” won’t work in sqlite!…thanks :)
hope somebody else finds it helpful!