1 in 子查询
1 use StudentManageDB 2 go 3 --select StudentName from Students 4 --where StudentId=(select StudentId from scoreList where sqlServerDB>80) 5 select StudentName from Students 6 where StudentId in (select StudentId from scoreList where sqlServerDB>80)
1 use StudentManageDB 2 go 3 select StudentId,StudentName from Students 4 where StudentId not in(select StudentId from scoreList)
2.exist 子查询