updata单列表 [英] updata single column table

查看:98
本文介绍了updata单列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我已经在单个列中创建了一个表.使用ExecuteNonQuery()更新单行时,它会做出反应以更改所有行的值(数据库).该表仅包含一行.........
我的前端是vb.net,后端是ms access.
谢谢U ..........

Hi, I have been created a table with in a single column. When updating a single row using ExecuteNonQuery() it react to change all rows the values(database). This table contain only one row........
My front end is vb.net and back end is ms access.
Thank U..........

推荐答案

要更新数据库表中的一行,您需要为每行设置一组标识符.
例如,一个主键.这样一来,您可以选择一行,然后对其进行更新.

查询示例为
To update a single row in your database table, you need to have a set of identifiers for every row.
For example, a primary key. That would enable you to select a single row and then update it.

An example query would be,
Update table set column2 = [value] where [column1] = [unique value]


这篇关于updata单列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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