# mysql根据一个表中的数据更新另一个表的数据

**URL:** <https://www.shiqidu.com/t/topic/333>\
**Category:** 开发调优\
**Tags:** MySQL\
**Created:** [December 7, 2017, 3:59am UTC](https://www.shiqidu.com/t/topic/333 "2017-12-07T03:59:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leon](https://www.shiqidu.com/user_avatar/www.shiqidu.com/leon/32/5_2.png) [@Leon](https://www.shiqidu.com/u/Leon)\
**Post date:** [December 7, 2017, 3:59am UTC](https://www.shiqidu.com/t/topic/333/1 "2017-12-07T03:59:58Z")

</div>

mysql根据一个表中的数据更新另一个表的数据

```mysql
update project INNER JOIN client ON client.id = project.clientID SET project.patternID = client.patternID  

```
