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 | 9 Comments »

Related Posts

9 Responses

  1. database - can we use truncate query in android sqlite - Stack Overflow Says:

    Kramer auto Pingback[...] source: http://phpcode.mypapit.net/how-to-truncate-table-in-sqlite-database/49/ [...]

  2. buget hotels in goa Says:

    I’m gone to tell my little brother, that he should also pay a visit this website on regular basis to obtain updated from most up-to-date information.

  3. anti-inflammatory supplements Says:

    Hello! I just want to give you a big thumbs up for your
    great information you have got right here on this post.

    I will be coming back to your web site for more soon.

  4. best anti wrinkle serum cream Says:

    This post is genuinely a pleasant one it helps new the web visitors, who
    are wishing in favor of blogging.

  5. Charles Says:

    Howdy! Quick question that’s completely off topic. Do you know how to make your site mobile friendly? My site looks weird when browsing from my iphone. I’m trying to find a template
    or plugin that might be able to correct this problem. If
    you have any suggestions, please share. Thank you!

  6. Need help for SQLite | CrazyEngineers Says:

    Kramer auto Pingback[...] in SQLite!! no other go we have to use delete….. For further reference check this link : How to Truncate table in SQLite database ยป Quick PHP Code Tips and Examples -Arvind slashfear, Feb 19, 2011 [...]

  7. san diego seo consultant Says:

    Greetings! This is my 1st comment here so I just
    wanted to give a quick shout out and tell you I really enjoy reading through your
    articles. Can you suggest any other blogs/websites/forums that cover the
    same topics? Appreciate it!

  8. Alleure Says:

    Excellent article. ?eep writing ?uch kind of info ?n yo?r blog.
    Im reall? impressed by yo?r site.
    Hey t?ere, You’ve ?one an excellen job. ? will defin?tely digg it an? individually
    sugges t? my friends. I’m confident t?ey
    ?ill be benefited from this website.

  9. seo techniques Says:

    Having read this I thought it was very informative.
    I appreciate you finding the time and effort to put this short article together.
    I once again find myself personally spending a significant amount of
    time both reading and posting comments. But so what, it was still worthwhile!

Leave a Comment

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