How to execute an sql script file against an SQLite 3 database file?

后端 未结 2 1691
滥情空心
滥情空心 2020-12-24 06:00

What is an SQLite 3 (3.7.11) analogue of MySQL\'s

mysql -p -u username database_name < file.sql

to execute all the queries in a given SQ

2条回答
  •  借酒劲吻你
    2020-12-24 06:37

    The following should work as well:

     echo "SELECT id, username, email FROM fos_user_user;" | sqlite3 app/data.db3
    

提交回复
热议问题