1. first, go to www.sqlite.org to download an SQLite database. It is an embedded database without the concept of a server. For Windows, it is an EXE and you can put it in a suitable directory, then add the directory to the system's PATH variable.
2. Then find a pysqlite, which is the python access SQLite interface, address here: http://initd.org/tracker/pysqlite
Currently, for different Python versions, pysqlite has two versions: 2.3 and 2.4. Select one based on your Python version.
3. Then you can open your favorite editor and write a test code.
4. During Chinese processing, SQLite is stored in UTF-8 encoding by default.
5. In addition, SQLite only supports file locks. In other words, it is not suitable for concurrent processing and is not recommended in the network environment. It is suitable for single-host environments. Import pysqlite2.dbapi2 as SQLite
Def runtest ():
Cx = SQLite. Connect ('test. db ')
Cu = Cx. cursor ()
# Create
Cu.exe cute (''' create table catalog (
Id integer primary key,
PID integer,
Name varchar (10) unique
)''')
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.