sqlite3如何判断某个表是否创建

来源:互联网 发布:mpls支持的网络协议 编辑:程序博客网 时间:2024/06/05 14:33

在执行建表语句的时候加上if not exists table_name


create table if not exists history (_id integer primary key AUTOINCREMENT ,page integer not null,introduce text,book text,record_uri text)

这样去数据的时候就不会报错。

0 0
原创粉丝点击