MySQL更新的问题?

peoples  ID age

student  ID age

UPDATE peoples SET age=age+(SELECT age FROM student WHERE peoples.id = student.id)

要怎么写才能让peoples表中相同ID数据才更新不同ID不更新

9煌
浏览 991回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

MySQL