Home >Database >Mysql Tutorial >判断一个表的数据不在另一个表中最优秀方法

判断一个表的数据不在另一个表中最优秀方法

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 17:59:38990browse

判断一个表的数据不在另一个表中最优秀方法

代码如下:
table a columns(key,value);
table b columns(key,value);

SELECT a.* FROM a LEFT JOIN b
ON a.key = b.key
WHERE b.key IS NULL

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