手动插入值到SQLite数据库 [英] Insert values into SQLite database manually

查看:139
本文介绍了手动插入值到SQLite数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的Andr​​oid开发和我刚开始学习的用户界面开发的基本知识。在我的应用程序,我有一个微调,我想从数据库值来填充微调。因此,对于从数据库取的值,所以必须在它的一些值。我要如何插入值到数据库中,而无需编写的程序?我可以将它像我们如何在MySQL和Oracle数据库插入值任何其他方式?
希望我的问题是很好理解的。

I'm new to Android development and I've just started learning the basics of user-interface development. In my app, I have a spinner and I want to populate the spinner with values from the database. So, for taking values from the database, there have to be some values in it. How do I insert values to the database without writing a program? Can I insert it in any other way like how we insert values in MySQL and Oracle databases? Hope that my problem is well understood.

推荐答案

您可以使用的 sqllite3 来自亚行的shell工具来手动执行查询。我不会依赖它是对生产设备虽然present(<一个href=\"http://stackoverflow.com/questions/5485890/how-to-install-or-get-access-to-sqlite3-from-adb-shell\">without生根,并通过几个步骤,痛苦的去的)。您可以在模拟器上使用的工具。

You can use the sqllite3 tool from an adb shell to perform queries manually. I would not rely on it being present on production devices though (without rooting and going through a few painful steps). You can use the tool on the emulator.

adb -s emulator-5554 shell
# sqlite3 /data/data/com.example.google.rss.rssexample/databases/rssitems.db
SQLite version 3.3.12

这篇关于手动插入值到SQLite数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆