I have a query as shown below.
select a.ab as new from tab a inner join tab b on a.ab=b.ab
When i try to run its showing.
MySQL returned an empty result set (i.e. zero rows).
because there are no rows for the selected condition.
Actual output i need is.
new
----
NULL
So i tried to add this query below.
select COALESCE(a.ab,'') as new from tab a inner join tab b on a.ab=b.ab
Still its giving
MySQL returned an empty result set (i.e. zero rows).
So how it is possible to display NULL value when MYSQL returns empty set.Any help appreciated.
inner join. If you still want some data useleft joininstead.