{"id":287,"date":"2017-05-24T15:29:33","date_gmt":"2017-05-24T19:29:33","guid":{"rendered":"http:\/\/techref.camellarry.com\/?p=287"},"modified":"2017-09-27T08:57:38","modified_gmt":"2017-09-27T12:57:38","slug":"truncate-a-sqlite-table","status":"publish","type":"post","link":"http:\/\/techref.camellarry.com\/?p=287","title":{"rendered":"SQLite Truncate a Table"},"content":{"rendered":"<p>The syntax for truncating a table in SQLite differs from that of SQL or mySQL. \u00a0Truncation means that all records are deleted but the table structure is left in place. \u00a0In addition, the record counter is reset to zero.<\/p>\n<p>To truncate a table in SQLite, the following two commands are used:<\/p>\n<pre><span style=\"color: #0000ff;\">Delete from TableName;\r\nDELETE FROM SQLITE_SEQUENCE WHERE name='TableName';<\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The syntax for truncating a table in SQLite differs from that of SQL or mySQL. \u00a0Truncation means that all records are deleted but the table structure is left in place. \u00a0In addition, the record counter is reset to zero. To truncate a table in SQLite, the following two commands are used: Delete from TableName; DELETE [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[8],"tags":[21,94,29,70,92,93],"class_list":["post-287","post","type-post","status-publish","format-standard","hentry","category-sql","tag-commands","tag-database","tag-example","tag-sql","tag-sqlite","tag-truncate"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9t3oE-4D","_links":{"self":[{"href":"http:\/\/techref.camellarry.com\/index.php?rest_route=\/wp\/v2\/posts\/287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/techref.camellarry.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/techref.camellarry.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/techref.camellarry.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/techref.camellarry.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=287"}],"version-history":[{"count":3,"href":"http:\/\/techref.camellarry.com\/index.php?rest_route=\/wp\/v2\/posts\/287\/revisions"}],"predecessor-version":[{"id":356,"href":"http:\/\/techref.camellarry.com\/index.php?rest_route=\/wp\/v2\/posts\/287\/revisions\/356"}],"wp:attachment":[{"href":"http:\/\/techref.camellarry.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/techref.camellarry.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=287"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/techref.camellarry.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}