时间:2021-07-01 10:21:17 帮助过:2人阅读
https://www.sqlite.org/index.html 官网
http://www.runoob.com/sqlite/sqlite-data-types.html
http://www.w3school.com.cn/sql/sql_where.asp
表名不能以数字开头
CREATE TABLE IF NOT EXISTS %@ (ID INTEGER PRIMARY KEY AUTOINCREMENT , Name TEXT NOT NULL, Voice TEXT NOT NULL, CreatedTime TEXT NOT NULL, Type TEXT NOT NULL)
主键自增 :PRIMARY KEY AUTOINCREMENT
判断表是否存在: IF NOT EXISTS
不允许为空
REPLACE INTO %@ (ID, Name, Voice, CreatedTime, Type) VALUES (NULL, ?, ?, ?, ?)
有则更新,无则添加 REPLACE INTO
SELECT * FROM %@ WHERE Type=‘%@‘ ORDER BY ID DESC LIMIT %d ,%d
字符判断字符要加单引号 Type=‘%@‘
倒叙 DESC
分页LIMIT
sqlite3 语法
标签:tps 分页 添加 ble esc sql www 允许 key