有兩張表,學生信息表infolist:
學生姓名表namelist:
現要查詢出,存在infolist中,而不存在namelist中的學生,語句如下:
select * from infolist where (select count(1) as num from namelist where infolist.name = namelist.name) = 0;
查詢結果如下:
age有些奇葩,不用在意。
有兩張表,學生信息表infolist:
學生姓名表namelist:
現要查詢出,存在infolist中,而不存在namelist中的學生,語句如下:
select * from infolist where (select count(1) as num from namelist where infolist.name = namelist.name) = 0;
查詢結果如下:
age有些奇葩,不用在意。
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。