sqlite 怎么把数据导入 csv文件

2025-03-26 02:03:29
推荐回答(1个)
回答1:

@echo off
echo drop table if exists test; > tmp.sql
echo create table test (id int, age int); >> tmp.sql
echo .separator ',' >> tmp.sql
echo .import csv.csv test >> tmp.sql
echo select * from test; >> tmp.sql
sqlite3.exe test.sqlite 0
以上代码就测试无误