你直接在运行的sql不知道是否符合你的要求。update bookinfo set remain=A.remain - B.shuliang from bookinfo Ainnerjoin borrowlist B on A.ISBN=B.ISBN