On 2015-11-03 05:36 AM, Simon Slavin wrote:
> On 3 Nov 2015, at 3:23am, H?ctor Fiandor <hfiandor at ceniai.inf.cu> wrote:
>
>> I have obtained the sqliteEstudio-2.0.26 and I  need to empty a table. Is
>> possible with this program? If not, how to do?
> I have no idea how that program works.  It is not SQLite, it is a program 
> which uses SQLite.  If you can issue commands in it, you want
>
> DELETE FROM myTable;
>
> which will delete all rows from the table.
>
> Simon.

Just a quick added note for the OP and in case anyone is following along...

Though others exist, Simon's suggestion is the very best solution 
specific to SQLite because the DB engine has optimizations for dealing 
(and efficiently executing) queries specifically formed like "DELETE 
FROM xxx;" to simply clean the table (as opposed to really removing the 
entries one by one).

Note: Using this method, if an auto-incrementing Primary key was used, 
the increment will remain where it was before and will not reset to the 
start. A PK without AUTOINCREMENT should reset. To reset an Auto-Inc 
table:  drop and recreate or change the corresponding value in the 
"sqlite_sequence" table. (Not sure now - this may require schema write 
access).


Reply via email to