如何创建动态的SQLite数据库表 [英] How to create dynamic database table in SQLite

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

问题描述

我想创建一个应用程序存储在SQ-精简版表信息。

I am trying to create one application to store information in sq-lite table.

但我想从用户如表名,列名和列数取表信息,还用户可以通过表名编辑,删除列添加新列。
我怎么能做到这一点。

But i want to take table information from user like table name, columns name, and number of columns, also user can edit that by table name, delete column add new column. how can i do it.

我添加例如屏幕申请表

推荐答案

Android版,您可以执行任意SQL字符串。从你的UI构造一个SQL字符串,然后输入字符串转换成一个命令类似于 db.execute(串)

Android allows you to execute arbitrary SQL strings. Construct a SQL strings from your UI and then input the string into a command similar to db.execute(string).

参考

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

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