Sqlite Study Notes 2: Create a database and sqlite Study Notes
In the last note, an sqlite executable file is generated, and cd is executed under the directory where sqlite is located:
Sqlite3 MyDataBase. db
A database named MyDataBase. db is created, and a file named MyDataBase. db is generated under the current path.
# Remember not to run sqlite3 first, and then the above command, but directly enter the above command on the terminal, otherwise the Error: error: near "sqlite3": syntax Error will be reported
Then run the following command:
. Databases
You can view the created database and run the following command to exit the database:
. Quit
You can also run the following command:
. Help
View help
How can I create a database in sqlite?
Use sqlite3 d:/test. db before going to sqlite>
C: \ Windows \ system32> sqlite3 test. db
How to Create a database in sqlite
You can directly enter sqlit3 + database name in the command line to create a database.