> For the complete documentation index, see [llms.txt](https://doc.tanmer.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.tanmer.cn/shu-ju-ku/postgresql/ji-chu-zhi-shi/ru-he-zai-postgresql-zhong-geng-xin-shu-ju.md).

# PostgreSQL中更新数据

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

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

```
