专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > 其他数据库

sqlite3中怎么导入数据

发布时间:2010-05-24 21:29:33 文章来源:www.iduyao.cn 采编人员:星星草
sqlite3中如何导入数据
在linux系统下
sqlite3 dbname "sql" > 1.txt
这样,可以将查询的内容导入到1.txt

现在我想将1.txt导入到另一个db的表里,表结构与导出的一致。
请问一下,如何操作??谢谢。

------解决方案--------------------
sqlite> .import 1.txt tt
------解决方案--------------------
引用For simple CSV files, you can use the SQLite shell to import the file into your SQLite database. First create the table, then designate the separator, and finally import the file.


sqlite> create table test (id integer, datatype_id integer, level integer, meaning text);
sqlite> .separator ","
sqlite> .import no_yes.csv test
Unfortunately, not all CSV files are simple. For instance, the CSV line


"Last, First", 1234
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: