Create an Empty SQLite Database on Windows
-
Lacking the UNIX touch command, you need a way to make an empty database for many SQLite operations. You can use the sqlite3 command directly for this, with the VACUUM statement to create a valid, empty database file for SQLite.
Assuming we want our database file to be mydatabase.db, you would use the following command:
sqlite3 mydatabase.db "VACUUM;"
That's it.
-
Appears that the database is created without the
VACUUM
portion, ie --sqlite3 mydatabase.db ;
-
@Danp said in Create an Empty SQLite Database on Windows:
Appears that the database is created without the
VACUUM
portion, ie --sqlite3 mydatabase.db ;
I've tried that and it doesn't work, or at least doesn't always work. Are you testing on Windows?
-
@scottalanmiller Yes, Windows 10.
-
@Danp said in Create an Empty SQLite Database on Windows:
@scottalanmiller Yes, Windows 10.
Odd, didn't work for me.