在SQLite数据库,如何插入多行表,在同一时间 [英] In Sqlite database, How to Insert Multiple Rows in Table at same time

查看:132
本文介绍了在SQLite数据库,如何插入多行表,在同一时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何我们可以同时插入SQLite数据库多行?我使用的是Android与Java。

How we can insert multiple rows in Sqlite database at same time? I'm using Android with Java.

推荐答案

您正在寻找的是 bulkInsert 。它将使您能够提供 ContentValues​​ 插入一个数组。看到Android文档的详细信息:

What you are looking for is bulkInsert. It will allow you to supply an array of ContentValues to insert. See the Android docs for more info:

<一个href="http://developer.android.com/reference/android/content/ContentResolver.html#bulkInsert%28android.net.Uri,%20android.content.ContentValues%5B%5D%29" rel="nofollow">http://developer.android.com/reference/android/content/ContentResolver.html#bulkInsert%28android.net.Uri,%20android.content.ContentValues%5B%5D%29

这篇关于在SQLite数据库,如何插入多行表,在同一时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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