如何将新列添加到sqlitedatabase中的现有表 [英] how to add new column to existing table in sqlitedatabase
本文介绍了如何将新列添加到sqlitedatabase中的现有表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
我有一个带图像和文字的数据库我想在该表中添加新的文本列但是它出错了
android。数据库 .sqlite.SQLiteException:没有这样的表:contacts2:, while 编译: INSERT INTO contacts2( image ,description,name) VALUES (?,?,?);
请帮帮我..................
解决方案
< blockquote>您必须首先使用 ALTER TABLE语句 [ ^ ]。
Hi all
I have a data base with image and text i want to add new text column to that table but it get error
android.database.sqlite.SQLiteException: no such table: contacts2: , while compiling: INSERT INTO contacts2(image, description, name) VALUES(?, ?, ?);
please help me any one..................
解决方案
You have to first add the new column to the existing table, using the ALTER TABLE statement[^].
这篇关于如何将新列添加到sqlitedatabase中的现有表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文