网站建设发展方向有哪些,网站阴影,网站开发软件著作权归谁,分销商城小程序Sqlite3系统命令 .quit 退出数据库 .exit 退出数据库 .help 显示帮助信息#xff0c;获取所有系统命令 .table 查看当前数据库下的所有表格 .schema 查看表的结构 Sqlite3语句 创建表格#xff1a; create table 表名 (字段名 数据类型, 字段名 数据类型); create table if… Sqlite3系统命令 .quit 退出数据库 .exit 退出数据库 .help 显示帮助信息获取所有系统命令 .table 查看当前数据库下的所有表格 .schema 查看表的结构 Sqlite3语句 创建表格 create table 表名 (字段名 数据类型, 字段名 数据类型); create table if not exists 表名 (字段名 数据类型, 字段名 数据类型); 删除表格 drop table 表名; 插入记录 insert into 表名 values (数据1, 数据2, 数据3); 查看记录 全部select * from 表名; 部分select * from 表名 where 限制条件; select 字段1, 字段2 from 表名 where 限制条件; 修改记录 update 表名 set 字段数值 where 限制条件; 删除记录 delete from 表名 where 限制条件; 修改表名 alter table 旧表名 rename to 新表名; Sqlite3的API 1,Sqlite3_open 功能打开一个数据库如果数据库不存在则创建一个数据库 2,Sqlite3_close 功能关闭数据库断开句柄所拥有的资源 3,sqlite3_errmsg 功能通过出错的句柄返回错误信息 4,sqlite3_exec 功能调用该函数执行sql语句 5,sqlite3_get_table 功能通过执行sql语句得到结果集中的内容 6,sqlite3_free_table 功能释放表的空间