1.上图两个表,要求找出掌握Skills中全部3个技能的员工,即神崎和相田,要求用mysql的语句实
2.刚学sql,不是很会,想了好久
3.下面是书里面用sql server写的,我也不是很理解,另外mysql中没有except
SELECT DISTINCT emp FROM EmpSkills ES1 WHERE NOT EXISTS (SELECT skill FROM Skills EXCEPT SELECT skill FROM EmpSkills ES2
SELECT DISTINCT emp FROM EmpSkills s WHERE NOT exists(SELECT skill FROM skills WHERE skill NOT IN (SELECT skill FROM EmpSkills Es2 WHERE Es2.emp = s.emp));
对应的数据替换一下就可以了.
对应的数据替换一下就可以了.