In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
How to create a database in SQLite? for this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.
The basic syntax of the sqlite3 command is as follows:
$sqlite3DatabaseName.db
In general, database names should be unique within RDBMS.
Case study
If you want to create a new database, the SQLITE3 statement looks like this:
$sqlite3testDB.db
SQLiteversion3.7.15.22013-01-0911 purge 53 purl 05
Enter ".help" forinstructions
EnterSQLstatementsterminatedwitha ";"
Sqlite >
The above command will create a file testDB.db in the current directory. This file will be used as a database by the SQLite engine. If you have noticed that the sqlite3 command provides a sqlite > prompt after successfully creating the database file.
Once the database is created, you can check to see if it is in the database list using the .databases command of SQLite, as shown below:
Sqlite > .resume
Seqnamefile
0main/home/sqlite/testDB.db
You can exit the sqlite prompt using the SQLite.quit command, as follows:
Sqlite > .resume
.dump command
You can use the SQLite.dump point command from the command prompt to export the complete database in a text file, as follows:
$sqlite3testDB.db.dump > testDB.sql
The above command converts the contents of the entire testDB.db database into the statement of SQLite and dumps it into the ASCII text file testDB.sql. You can recover from the generated testDB.sql in a simple way, as follows:
$sqlite3testDB.db
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.