Home > Backend Development > PHP Tutorial > mysql 更新有关问题

mysql 更新有关问题

WBOY
Release: 2016-06-13 12:47:51
Original
726 people have browsed it

mysql 更新问题
UPDATE cg_disease_department AS a SET a.department_id = 
  SELECT department_id FROM cg_department AS b WHERE a.department_name = b.name

我的需求是 将b表的departmentid 更新到 a表的departmentid 条件是 a.department_name = b.name

我这sql问题在那

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template