EXISTS
指定一个子查询,检测行的存在。
SELECT DISTINCT name
FROM student
WHERE EXISTS
(SELECT *
FROM register
WHERE id = student.id);
(note that if some rows in student register.id =student.id, all those rows in student are selected out.)
更多内容请见原文,文章转载自:https://blog.csdn.net/qq_44591615/article/details/109204925
相关文章
- 01-12SQL中EXISTS怎么用[转]
- 01-12EXISTS 在SQL语句中怎么用?
- 01-12数据库——SQL中EXISTS怎么用3(转)
- 01-12数据库——SQL中EXISTS怎么用2(转)
- 01-12数据库——SQL中EXISTS怎么用1(转)
- 01-12SQL中EXISTS怎么用[转]