SQLite
来源:互联网 发布:c语言 if else 编辑:程序博客网 时间:2024/05/18 03:21
一些有用的 SQLite 命令
显示表结构:
sqlite> .schema [table]
sqlite > .tables
获取指定表的索引列表:
获取指定表的索引列表:
sqlite > .indices [table ]
导出数据库到 SQL 文件:
sqlite > .output [filename ]
sqlite > .dump
sqlite > .output stdout
sqlite > .dump
sqlite > .output stdout
从 SQL 文件导入数据库:
sqlite > .read [filename ]
格式化输出数据到 CSV 格式:
sqlite >.output [filename.csv ]
sqlite >.separator ,
sqlite > select * from test;
sqlite >.output stdout
sqlite >.separator ,
sqlite > select * from test;
sqlite >.output stdout
从 CSV 文件导入数据到表中:
sqlite >create table newtable ( id integer primary key, value text );
sqlite >.import [filename.csv ] newtable
sqlite >.import [filename.csv ] newtable
备份数据库:
/* usage: sqlite3 [database] .dump > [filename] */
sqlite3 mytable.db .dump > backup.sql
/* usage: sqlite3 [database ] < [filename ] */
sqlite3 mytable.db < backup.sql
sqlite3 mytable.db < backup.sql
0 0
- SQLite
- SQLite
- SQLite
- SQLite
- SQLite
- sqlite
- sqlite
- SQLite
- SQLite
- sqlite
- SQLite
- SQLite
- SQLite
- SQLite
- SQLite
- sqlite
- sqlite
- sqlite
- 竞价内容与优化内容区别合理编辑网站内容
- SQLite创建表并添加数据
- Discuz! X2 计划任务原理分析
- [经典面试题]在O(1)时间删除链表结点
- Android 手把手教您自定义ViewGroup(二) 实战篇 -> 实现FlowLayout
- SQLite
- PHP中SESSION与COOKIE
- redhat 安装yum教程(解决依赖关系)-bash: yum: command not found 问题解决
- Android Material Design-Working with Drawables(使用Drawable)-(五)
- 点评:当你的云部署并不如供应商所宣传的那样好时怎么办?
- iOS: (库) 图片异步下载/缓存-SDWebImage的使用
- PHP递归调用数组值并用其执行指定函数
- 浅析Java中CountDownLatch用法
- Multipart传递参数request收不到解决方法