Search:
Main Menu
Login | RSS |

Quick PHP Code Tips and Examples

PHP Programming Tips, Tutorials and Source Code Examples for newbie

How to Truncate table in SQLite database

June 4th, 2008 by 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:
  1. sqlite your_database.db
  2. sqlite> DELETE FROM some_table;

after that, dont forget to execute VACUUM to compact the database :

CODE:
  1. sqlite> VACUUM;

Bookmark Post:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • NewsVine
  • Reddit
  • Netvouz
  • Spurl
  • Furl
  • digg
  • YahooMyWeb
  • del.icio.us

Posted in Uncategorized |

Related Posts

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.