8
  1. I have a SQLite Database 4MB.
  2. I used command drop table name; and I dropped it. I checked in SQlite Manager that no more table name.
  3. However, I checked the filesize, it is still 4MB, the same.
  4. I use NotePade, open the Database I see the old contents which I have inserted are still there.

Did I do anything wrong on drop table command? or SQLite keeps old data and filesize will the same?

Thanks your help.

Ken Le
  • 1,787
  • 2
  • 22
  • 34
  • It keeps them in the file, but will later overwrite as needed. If I remember correctly, you can do a `vacuum` to clean up old data. – Maerlyn Apr 27 '13 at 10:47

1 Answers1

13

You need to read https://stackoverflow.com/a/2143808/2198378

Although file size was same, data will be overridden.

To avoid it, refer VACUUM and auto_vacuum.

Community
  • 1
  • 1
jeyraof
  • 863
  • 9
  • 28