SQL中的ALL、ANY和SOME的用法介绍
SQL数据库开发
共 1407字,需浏览 3分钟
·
2020-10-01 02:37
点击关注上方“SQL数据库开发”,
设为“置顶或星标”,第一时间送达干货
SELECT Num FROM Test2
WHERE Num > ALL (SELECT Num FROM Test1)
SELECT Num FROM Test2
WHERE Num < ALL (SELECT Num FROM Test1)
SELECT Num FROM Test2
WHERE Num > ANY (SELECT Num FROM Test1)
SELECT Num FROM Test2
WHERE Num > SOME (SELECT Num FROM Test1)
"=ANY"与"IN"相同
SELECT Num FROM Test2
WHERE Num = ANY (SELECT Num FROM Test1)
SELECT Num FROM Test2
WHERE Num IN (SELECT Num FROM Test1)
SELECT Num FROM Test2
WHERE Num <> ALL (SELECT Num FROM Test1)
SELECT Num FROM Test2
WHERE Num NOT IN (SELECT Num FROM Test1)
——End——
后台回复关键字:1024,获取一份精心整理的技术干货 后台回复关键字:进群,带你进入高手如云的交流群。 推荐阅读 这是一个能学到技术的公众号,欢迎关注
评论