Opening database file from within SQLite command-line shell

后端 未结 8 867
时光说笑
时光说笑 2021-01-29 21:07

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

8条回答
  •  囚心锁ツ
    2021-01-29 21:49

    The same way you do it in other db system, you can use the name of the db for identifying double named tables. unique tablenames can used directly.

    select * from ttt.table_name;
    

    or if table name in all attached databases is unique

    select * from my_unique_table_name;
    

    But I think the of of sqlite-shell is only for manual lookup or manual data manipulation and therefor this way is more inconsequential

    normally you would use sqlite-command-line in a script

提交回复
热议问题