Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Count mismatch in two very small queries

Orcl ApexJan 12 2021

Hi All,
I have two queries and there is a count mismatch in both queries. I couldn't understand why it is different because to me both of these look similar. Please help me with understanding.

Query 1 -
SELECT COUNT (*)
FROM (
SELECT t1.c3
, t2.c3
FROM t1 t1
, t2 t2
WHERE 1 = 1
AND t1.c1 = 'A'
AND t1.c2 = t2.c2 (+))
Query 2 -
SELECT COUNT (*)
FROM (
SELECT t1.c3
, ( SELECT t2.c3
FROM t2 t2
WHERE t1.c2 = t2.c2 (+))
FROM t1 t1
WHERE t1.c1 = 'A')

This post has been answered by Frank Kulash on Jan 12 2021
Jump to Answer
Comments
Post Details
Added on Jan 12 2021
8 comments
1,165 views