java 将.sql文件导入sqlite数据库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13467171/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 12:52:21  来源:igfitidea点击:

Import .sql file into sqlite database

javaandroidsqlite

提问by Bishan

I have a .sqlfile with insert statementsin C:\sqldata\MyData.sql. I need to insert data into sqlitedatabase in my Android App using this .sqlfile.

我有一个.sql文件insert statementsin C:\sqldata\MyData.sql. 我需要sqlite使用此.sql文件将数据插入到我的 Android 应用程序中的数据库中。

How could I do this?

我怎么能这样做?

回答by Ercan

First of all download sqlite browser or equivalent software and execute your create-insert statements. then follow that tutorial(which is an awesome tutorial)

首先下载 sqlite 浏览器或等效软件并执行您的 create-insert 语句。然后按照那个教程(这是一个很棒的教程)