首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

sqlite3中怎么导入数据

2012-02-28 
sqlite3中如何导入数据在linux系统下sqlite3 dbname sql 1.txt这样,可以将查询的内容导入到1.txt现在

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

热点排行