I\'m using the SQLite Command Line Shell. As documented, I can open a database by supplying it as an argument to the executable:
sqlite3 data.db
You can attach one and even more databases and work with it in the same way like using sqlite dbname.db
sqlite3
:
sqlite> attach "mydb.sqlite" as db1;
and u can see all attached databases with .databases
where in normal way the main is used for the command-line db
.databases
seq name file
--- --------------- ----------------------------------------------------------
0 main
1 temp
2 ttt c:\home\user\gg.ite
The command within the Sqlite shell to open a database is .open
The syntax is,
sqlite> .open dbasename.db
If it is a new database that you would like to create and open, it is
sqlite> .open --new dbasename.db
If the database is existing in a different folder, the path has to be mentioned like this:
sqlite> .open D:/MainFolder/SubFolder/...database.db
In Windows Command shell, you should use '\' to represent a directory, but in SQLite directories are represented by '/'. If you still prefer to use the Windows notation, you should use an escape sequence for every '\'