sqlite-其他操作

判断表是否存在

//判断表是否存在
select count(*) from sqlite_master where type = 'table' and name = 'T_test'

创建数据库


获取记录总数

获取记录总数
select count(*) from t_info (f_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, f_attr_id INTEGER NOT NULL, f_datatime TEXT DEFAULT CURRENT_TIMESTAMP NOT NULL");

f_id_noise integer 0
select * from t_3764846313_5539326756021866496 where f_id_noise=1476754630 ORDER BY f_datetime DESC LIMIT 1