On Oracle 9i, why does the following produce the result 'abc'
select 'abc ' || (select txt from
(select 'xyz' as txt from dual where 1=2))
from dual
while this produces 'abc xyz':
select 'abc ' || (select txt from
(select count(*), 'xyz' as txt from dual where 1=2))
from dual
Why does adding count(*) to the subquery result in different behavior? Should the predicate where 1=2 preclude any results in the subquery?
select count(*) from dual where 1=2
returns 0. That is, a row with the value zero.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With