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

Related Posts

20 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!

  10. icloud lock removal tool Says:

    That was ‘three months after Apple removed the popular Google Maps from its operating system, and Apple Maps
    being widely panned in tech reviews and among customers. Indeed, it worked on both Internet Explorer and
    Chrome. The partnership between HTC and Dropbox (which means
    an annual payment can increase storage capacity up to 100GB) is to be a response to the launch
    of icloud by Apple, a product that although it shares similar functions with Dropbox, have differences root: the icloud, and
    allows data storage in the cloud allows you to back up the system preferences and support the entire team, Dropbox lets you upload files to a virtual
    hard drive that links the same folder the various devices we use with the application, whether
    PCs, Smartphones or Tablets.

    Review my web site – icloud lock removal tool

  11. http://trichegemmesclashofclans.info/ Says:

    My favorite a single now is “The Witch Repellent” (it’s any Community Area 10 trophy looking base).
    Without the brand loyalty, they instead have to rely onn the mercurial currency called “engagement” to create buzz for their product.
    It is so quiet, there iis no background noise,
    it must be experienced too be believed.

    Stop by mmy homepage :: http://trichegemmesclashofclans.info/

  12. Gallery User Administration Says:

    Kramer auto Pingback[...] Back to album [...]

  13. How to Truncate table in SQLite database » Quick PHP Code Tips and Examples Says:

    Kramer auto Pingback[...] How to Truncate table in SQLite database June 4th, 2008 by Jon Moffet [...]

  14. Explicit Content Agreement | Cracker Classifieds - Cracker free ads & forums - find, sell or say anything! Says:

    Kramer auto Pingback[...] By clicking on the link below, I release Cracker from any liability that may arise from my use of this site. Take me to Adult services [...]

  15. Windsurfcenter am Davosersee Says:

    Kramer auto Pingback[...] Zurück zu: Album [...]

  16. content spinning Says:

    Amazing thing? here. ? am very satisfied to lo?k your
    post. T?anks so much and I am lo?king forward to contact you.
    ?ill you kibdly d?op me a e-mail?

  17. Trafic Organique Naturel Says:

    What a material of un-ambiguity and preserveness of precious
    know-how concerning unpredicted emotions.

  18. Semanal 20 Says:

    I think this is one of the most significant information for me.
    And i’m satisfied reading your article. But should remark on some basic issues, The web site style is wonderful, the articles is
    in reality nice : D. Excellent activity, cheers

  19. SEO Says:

    I’m gone to inform my little brother, that he should also visit this website on regular basis to obtain updated from most
    recent information.

  20. trafic organique Says:

    you’re truly a just right webmaster. The site loading velocity is incredible.
    It kind of feels that you are doing any distinctive trick.
    Also, The contents are masterwork. you have performed a
    magnificent process on this subject!

Leave a Comment

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