Lamentably, we don't have TRUNCATE TABLE order in SQLite yet you can utilize SQLite DELETE order to erase total information from a current table, however it is prescribed to utilize DROP TABLE order to drop the total table and re-make it by and by.
Syntax
Following is the essential language structure of DELETE order.
sqlite> DELETE FROM table_name;
Following is the essential language structure of DROP TABLE.
sqlite> DROP TABLE table_name;
In the event that you are utilizing DELETE TABLE order to erase all the records, it is prescribed to utilize VACUUM order to clear unused space.
Example
Consider COMPANY table with the accompanying records.
ID NAME AGE ADDRESS SALARY
---------- ---------- ---------- ---------- ----------
1 Paul 32 California 20000.0
2 Allen 25 Texas 15000.0
3 Teddy 23 Norway 20000.0
4 Mark 25 Rich-Mond 65000.0
5 David 27 Texas 85000.0
6 Kim 22 South-Hall 45000.0
7 James 24 Houston 10000.0
Following is the guide to shorten the above table −
SQLite> DELETE FROM COMPANY;
SQLite> VACUUM;
Presently, COMPANY table is shortened totally and nothing will be the yield from SELECT explanation.