有两张表,学生信息表infolist:
学生姓名表namelist:
现要查询出,存在infolist中,而不存在namelist中的学生,语句如下:
select * from infolist where (select count(1) as num from namelist where infolist.name = namelist.name) = 0;
查询结果如下:
age有些奇葩,不用在意。
设为首页 加入收藏 |
|
当前位置: |
TOP | ||||||||||
mysql 查询存在A表中而不存在B表中的数据
|
||||||||||
最新文章 |
热门文章 |
Hot 文章 |
Python | ||||||||||
|
||||||||||
C 语言 | ||||||||||
|
||||||||||
C++基础 | ||||||||||
|
||||||||||
大数据基础 | ||||||||||
|
||||||||||
linux编程基础 | ||||||||||
|
||||||||||
C/C++面试题目 | ||||||||||
|
||||||||||