我正在尝试从 Ubuntu 11.04 上的 csv 文件填充 SQLite 数据库。我运行了以下命令:
create table data1 (id integer, city text, bank text, address text);
.separator ","
.import atm_list_india_updated.csv data1
谁能告诉我出了什么问题?为什么会出现此错误?
sqlite> .tables // shows there is a table called data1
data1
sqlite> select * from data1
...> ;
sqlite> .import *******.csv data1;
Error: no such table: data1; // tells there is no table called data1
sqlite> .show
echo: off
explain: off
headers: off
mode: list
nullvalue: ""
output: stdout
separator: ","
stats: off
width:
sqlite>
最佳答案
与作为SQLite Shell内置命令的其他点命令一样,.import
命令不应以分号结尾。
关于csv - sqlite3没有给出这样的表错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/7232538/