Subject | Is there any logical difference? |
---|---|
Author | liviuslivius |
Post date | 2019-08-09T09:04:24Z |
Hi
I have the query where this make a difference and i do not know why...
Is there any logical difference between this two statements? Or some sql feature difference?
1. -------------------------
NOT
(
EXISTS()
OR
EXISTS()
)
2. -------------------------
CASE WHEN EXISTS() THEN 1 ELSE 0 END
+
CASE WHEN EXISTS() THEN 1 ELSE 0 END
= 0
----------------------------------------
the query plans are exactly the same.
First query return nothing, second one return 211 records.
regards
Karol Beieniaszewski
PS. I resend my email as previous from Thu, 08 Aug 2019 15:00:25 +0200 is still not visible on the group