不在 SQL Server 2005 中
我怎么能看到表中没有的东西...我知道我知道...只能看到那里有的东西但是来吧!
所以!!
select * from ORDER where State IN ('MA','PA','GA','NC')
所以我会得到 MA 和 PA,但我想看看 GA 和 NC...
NOT IN
将返回 NY、NJ、CT 等...我只想看看 ( )
How can I see what is not in the table... I know I know...can only see what is there but come on!!!
So!!
select * from ORDER where State IN ('MA','PA','GA','NC')
So I will get MA and PA but I want to see GA and NC....
NOT IN
will return NY,NJ,CT ect.... I just want to see what is in the ( )
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
看起来您在 GA 前面缺少一个单引号
'
。It looks like you are missing a single quote
'
in front of GA.我对这个问题的理解是:对于给定的状态列表,哪些状态不存在于 Order 表中?
这将向您显示下面列出的四个状态中哪些状态在 <代码>订单表:
My understanding of the question is: For a given list of states, which ones do not exist in the Order table?
This will show you what states out of the four listed below have no corresponding records in the
Order
table:我将尝试在这里阅读一下字里行间:
I'm going to try to read between the lines a little here:
您只是想找出除了这四个州之外还有哪些州吗?如果是这样:
Are you just trying to find out which states there are except for those four? If so: