Home >Database >Mysql Tutorial >mysql 跨表查询、更新、删除示例_MySQL

mysql 跨表查询、更新、删除示例_MySQL

WBOY
WBOYOriginal
2016-06-01 13:18:291053browse

bitsCN.com 下面来谈谈跨表插入,更新和删除

首先讨论的是跨表查询:

insert into `table_A` select * from `table_B`;注意*代表全部插入。

接着又讨论关于跨表更新

update `table_A`, `table_B` set `table_A`.`name` = `table_B`.`name` where `table_A`.`id` = `table_B`.`id`;
bitsCN.com

Statement:
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