Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to name an SQLite database so it doesn't have the default name of main?

How can I name an SQLite database so it doesn't have the default name of main?

like image 231
Francisc Avatar asked Sep 05 '11 22:09

Francisc


1 Answers

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.

like image 101
yakatz Avatar answered Sep 30 '22 05:09

yakatz