如何更新sqlite的一整列? [英] How to update an entire column in sqlite?

查看:871
本文介绍了如何更新sqlite的一整列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  

可能重复:结果
  <一href=\"http://stackoverflow.com/questions/5416836/need-to-update-the-value-of-a-column-in-sqlite\">Need更新的SQLite列的值


大家好我有5条记录在我的SQLite数据库表我的Andr​​oid应用程序。值是5,25,15,25,25。现在我想用50来更新我的整列例如5 + 50 = 55,为所有的值不喜欢的。我不知道怎么写更新查询。谁能告诉我?先谢谢了。


解决方案

 更新表SET列=列+ 50;

这应该可以帮助你:它通过添加50到列更新所有行的值。如果你想要别的东西(你的问题不说清楚),那么请更新您的问题,并进一步解释。

Possible Duplicate:
Need to update the value of a column in SQLite

Hi all I have 5 records in my SQLite data base table for my android application. The values are 5,25,15,25,25. Now i want to update my entire column with 50. For example 5+50=55 and do like the for all the values. I don't know how to write update query. Can anybody tell me? Thanks in advance.

解决方案

UPDATE table SET column=column+50;

This should help you: It updates the values of all rows by adding 50 to the column. If you want something else (your question is not that clear), then please update your question and explain further.

这篇关于如何更新sqlite的一整列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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