SQLite数据库介绍
时间:2022-03-13 22:40
SQLite是一个文件数据库,不像Mysql,Oracle等数据库有很多进程,被很多语言bullet-in成了自己的模块,python、php、ruby都支持,作为一个小app或者更大软件不需要连接网络上数据库是一个很好的选择,一些linux主机还会初始安装sqlite.
下面给出一个最简单的示例代码:
import sqlite3 conn = sqlite3.connect(‘test.db‘) cur = conn.cursor() cur.execute(‘select count(*) from tab_test ‘) rs = cur.fetchone() count = rs[0] print "Records count:",count
参考文章
官网
shell command
本文出自 “” 博客,请务必保留此出处
SQLite数据库介绍,布布扣,bubuko.com