如何更新表中的多个字段 [英] How to Update multiple fields in a table

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

问题描述

有人可以告诉我更新多个字段的更新规则的正确语法。

我想更新记录中的少数项目(表中的几个字段)。


谢谢

Can some one tell me the correct syntax of Update statment for updating multiple fields.
I want to update few item in record (few fields i a table).

Thanks

推荐答案


有人可以告诉我更新多个字段的更新规则的正确语法。

我想更新记录中的少数项目(表格中的几个字段)。


谢谢
Can some one tell me the correct syntax of Update statment for updating multiple fields.
I want to update few item in record (few fields i a table).

Thanks



是的,


进入查询,而不是选择新的!选择使用向导设计的设计!


从菜单中选择查询 - >更新查询


添加要更新的表格


添加应更新的记录...

在行中更新以写入kdlsk如果kdlsk是你想要更新到你的领域的字符串


如果你想用其他字段类型的信息更新字段:[TheSourceField]其中TheSourceField是的名称带有信息的字段!

Yeah,

Go in Queries, than choose new one! Choose the design instaed using wizard!

From the menu choose query -> Update query

Add the table u want to update

Add the records that should be updated...

In the row Update to write "kdlsk" if kdlsk is the string that u want to update to your field

If u want to update a field with the information from other field type: [TheSourceField] Where TheSourceField is the name of the field with the information!


如果您只想这样做,那么PEB的回答可以帮助您轻松完成。

如果您想要语法然后按照PEB中的说明进行操作,然后选择View / SQL视图。看看那里的SQL代码,你会有一个例子。


否则帮助没有提到多个字段,但提供一般信息。
If you just want to do it, then PEB''s answer helps you to do it easily.
If you want the syntax then follow instructions in PEB''s then select View / SQL view. Look at the SQL code there and you will have an example.

Otherwise the Help doesn''t mention the multiple fields but give the general info.

UPDATE语句

创建一个更新查询,根据指定的条件更改指定表中字段的值。


语法

UPDATE表

SET newvalue

WHERE标准;


UPDATE语句包含以下部分:


部分描述

table包含要修改的数据的表的名称。

newvalue一个表达式,用于确定要插入更新记录中特定字段的值。

criteria用于确定将更新哪些记录的表达式。仅更新满足表达式的记录。
UPDATE Statement
Creates an update query that changes values in fields in a specified table based on specified criteria.

Syntax
UPDATE table
SET newvalue
WHERE criteria;

The UPDATE statement has these parts:

Part Description
table The name of the table containing the data you want to modify.
newvalue An expression that determines the value to be inserted into a particular field in the updated records.
criteria An expression that determines which records will be updated. Only records that satisfy the expression are updated.


对于多个字段

For Multiple Fields

展开 | < span class =codeLinkonclick =selectAll(this);>选择 | Wrap | 行号


这篇关于如何更新表中的多个字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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