How can I name an SQLite database so it doesn't have the default name of mai开发者_Go百科n
?
I don't think so.
The main
database has a special meaning.
You can attach other databases with other names.
From http://www.sqlite.org/sqlite.html
The ".databases" command shows a list of all databases open in the current connection. There will always be at least 2. The first one is "main", the original database opened. The second is "temp", the database used for temporary tables. There may be additional databases listed for databases attached using the ATTACH statement. The first output column is the name the database is attached with, and the second column is the filename of the external file.
You can't. "main" is simply the name which SQLite always uses for the primary database that you have open. (If necessary, you can add extra databases using ATTACH
, though.)
http://www.sqlite.org/lang_attach.html
精彩评论