`
learnmore
  • 浏览: 589506 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

not in带来的问题

 
阅读更多
在使用not in 的时候,内表和外表比较的字段如果含有null的话会出现查询逻辑错误的问题,如:
select count(1) from "customer_tmp"  t where t."name" not  in (select "name" from "client1")

如果name的值为null的话,用not in会有逻辑错误!

结论:还是全部换成not exists吧,语法如下:
select count(1) from "customer_tmp" t where  not exists (select c."name" from "client1" c where c."name"=t."name")
分享到:
评论

相关推荐

    MySQL5.7中的sql_mode默认值带来的坑及解决方法

    在正常项目开发过程中,如果MySQL版本从5.6升级到5.7版本。作为DBA在考虑数据库版本升级带来的影响时,一般会有几个注意点...ERROR 1055 (42000): Expression #3 of XXXXXX list is not in GROUP BY clause and contain

    三步解决:Could not locate executable null\bin\winutils.exe in the Hadoop binaries.

    自律成为习惯,优秀自然而然。 发现问题 分析:这种问题的出现主要是我们在window模式环境中开发的时候没有搭建...这是我在自学过程中遇到的问题,希望能够给别人带来帮助。谢谢。 作者:Leslie Cheung(自律者)

    kubernets-all-images-1.18.1.tar.gz

    此包的内容为k8s1.18.1版本安装是所需要的镜像都提前下载并打包上传,为我们顺利部署k8s解决墙而带来的docker pull 慢的问题

    Notre-Dame De Paris - New Tab in HD-crx插件

    22庄严的notre-dame de paris图像在HD中为... 我们的目标是为世界各地的人们带来优秀的新标签。 优化浏览器新的选项卡布局。 每个背景都是挑选的杰作 - 每次在Chrome中打开一个新标签时都会享受它们! 语言:English

    对于人工智能的看法英语作文.pdf

    In addition, it's troublesome and annoying for us to make a change when they are not satisfied with what we bought online. The second disadvantage is security issues. When we shop online, we need pay...

    再不迷路:谷歌地图革命催生新产业并带来增强现实(英文版)

    Never Lost Again chronicles the evolution of mapping technology—the "overnight success twenty years in the making." Bill Kilday takes us behind the scenes of the tech’s development, and introduces ...

    C++编程思想源代码

    C++编程思想源代码用于编程思想,会给大家带来帮助 Copyright (c) 2000, Bruce Eckel Source code file from the book "Thinking in C++" All rights reserved EXCEPT as allowed by the following statements: ...

    经典6级考试作文模板,不看不要后悔有

    to develop their interpersonal skills, which may put them in a favorable position in the future job markets.兼职可以让学生们学习个人技巧,这样可以在找工作时更有竞争力 8)By taking a major-related ...

    对于人工智能的看法英语作文.docx

    In addition, it's troublesome and annoying for us to make a change when they are not satisfied with what we bought online. The second 对于人工智能的看法英语作文全文共4页,当前为第2页。对于人工智能的...

    对于人工智能的看法英语作文(2).docx

    In addition, it's troublesome and annoying for us to make a change when they are not satisfied with what we bought online. The second 对于人工智能的看法英语作文(2)全文共4页,当前为第2页。对于人工智能...

    对于人工智能的看法英语作文(1).docx

    In addition, it's troublesome and annoying for us to make a change when they are not satisfied with what we bought online. The second 对于人工智能的看法英语作文(1)全文共4页,当前为第2页。对于人工智能...

    基于协同过滤的推荐算法研究.caj

    丰富的社交网络信息给推荐系统带来的新的机遇也提出了更大的挑战,如何有效地挖掘海量的社交网络信息以提高推荐算法的精度是社交网络推荐系统研究的核心问题。本文基于腾讯微博用户的真实社交网络信息,构建有效的用户...

    游戏编程--设计思想

    But do not program in COBOL if you can avoid it. 但是尽量不要用COBOL语言。 1.3 In the beginning was the Tao. The Tao gave birth to Space and Time. Therefore, Space and Time are the Yin and Yang of...

    RobotFramework-常用断言讲解.pdf

    RobotFramework-常⽤断⾔讲解 常⽤断⾔讲解 RobotFramework带有丰富的系统关键,使⽤时⽆需导⼊,直接使⽤,为写⾃动化⽤例带来了极⼤的⽅便;不能停留在知道或者是会得程度,只有熟练使⽤各关键字,才能 提升⾃动化...

    RobotFramework-常用断言讲解(1).pdf

    RobotFramework-常⽤断⾔讲解 常⽤断⾔讲解 RobotFramework带有丰富的系统关键,使⽤时⽆需导⼊,直接使⽤,为写⾃动化⽤例带来了极⼤的⽅便;不能停留在知道或者是会得程度,只有熟练使⽤各关键字,才能 提升⾃动化...

    LINUX 下防火墙的研究与实现(详细配置)

    为了充分利用网络技术带来的快捷和方便, 越来越多的公司和政府部门在公司或部门范围内组建起自己的计算机网络系统(Intranet), Intranet的技术优势, 给公司带来了高效的工作效率的同时, 也带来了全新的安全问题。...

    Cookieshop:一家轻巧的饼干吧工厂,为您带来观赏的乐趣

    一家轻巧的饼干吧工厂,为您带来观赏的乐趣 亮度 该脚本是自主的,它可以与纯自然javascript一起使用。 仅3kb,非常适合保留页面行。 安装方式 复制粘贴 < script type = "text/javascript" src = "cookieBar.js...

    Python中eval带来的潜在风险代码分析

    "[x for x in range(10)]") [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 当内存中的内置模块含有os的话,eval同样可以做到命令执行: >>> import os >>> eval("os.system('whoami')") win-20140812chj\...

    毕业设计-jsp-servlet-javabean网上订餐系统.doc

    The Internet had 10 remaining years of life development in a moment in China, China's web cams understands fully "enjoys a trip to between the world, the network does not have carefree which the ...

Global site tag (gtag.js) - Google Analytics