# PostgreSQL中更新数据

```
-- 更新 users 表中列名为 updated_at 的所有行数据
update users set updated_at = now();

-- 更新 users 表中列名为 updated_at 条件为 id = 1 这一行数据
update users set updated_at = now() where id = 1;

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.tanmer.cn/shu-ju-ku/postgresql/ji-chu-zhi-shi/ru-he-zai-postgresql-zhong-geng-xin-shu-ju.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
