On Mon, Jun 25, 2012 at 01:01:46AM -0700, L Anderson wrote:
> Googling on how to create a sqlite database (empty one) it appears
> I need only do 'sqlite3 test.db'.  However, when I try that I get:
> 
> ->sqlite3 test.db
> SQLite version 3.7.13 2012-06-11 02:05:22
> Enter ".help" for instructions
> Enter SQL statements terminated with a ";"
> sqlite>
> 
> however, no database is created.  What am I doing wrong and what
> do I need to do to create an empty database 'test.db'?

Perhaps you have to fill the database with some of your own data (and later
delete them if you want really empty DB). Otherwise it will not even remember
your PRAGMA settings etc.:

$ rm -f test.db
$ sqlite3 test.db "pragma page_size=512;"
$ wc -c test.db
       0 test.db
$ sqlite3 test.db "pragma page_size;"
1024
$ sqlite3 test.db "pragma page_size=512;
        create table t(c);drop table t;vacuum;"
$ wc -c test.db
     512 test.db
$ sqlite3 test.db "pragma page_size;"
512
$

Valentin Davydov.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to