> For the complete documentation index, see [llms.txt](https://sugar-at.gitbook.io/blog-article/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sugar-at.gitbook.io/blog-article/sql/update.md).

# 3. 修改

```sql
-- 普通修改
UPDATE  test SET hours=12.1 WHERE  essn ='123456789' 

-- 带子查询的修改
UPDATE test SET hours = (SELECT MAX(hours) FROM works_on) WHERE essn = '123456789'
```
