Heim >Datenbank >MySQL-Tutorial >判断一个表的数据不在另一个表中最优秀方法

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

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

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

代码如下:
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

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn