NULL对sql in/not in查询的影响

NULL会导致in/not in 查询查不出结果。这一点需注意

解决方式是使用 EXISTS 代替IN

原: where xxx in ()

新:where exists ()

Leave a Reply

Your email address will not be published. Required fields are marked *

lWoHvYe 无悔,专一