本文介绍了如何使用Not IN与子查询中的子句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
HI Everyone
我需要有关Sql查询的帮助
从country ='india'的国家/地区选择*(他们bith是同一张桌子)
并且不存在
select * from country are country ='Nepal'
请一些人帮我获取不同的记录(第二次查询中没有,但存在于第一次查询中)。
当我执行它时,它返回给我没有值。
实际上我应该返回不在的值第二个查询。
谢谢
解决方案
HI Everyone
I need help with Sql query
select * from country where country = 'india' (they bith are same table)
and not exists
select * from country were country='Nepal'
Please can some one help me to get the distinct records(which are not there in 2nd query but exists in 1st query) .
When I am executing this its returning me no values.
Actually I should return the values which are not in the second query.
Thanks
解决方案
这篇关于如何使用Not IN与子查询中的子句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!