Need to return a “canned” row when there is no rows in a select. So something like
select col1 from table where col1 = 'something'
if this returns 1 row or greater fine, but if it returns no rows, need to return something like ‘nothing’ as col1. There are reasons for my madness….
I have tried
select
case when col1 is null
then
'nothing'
else
col1
end as col1
from table where col1 = 'something'
But this will not return ‘nothing’ since there are no rows to process…..
In Oracle I would write this:
I don’t know how to emulate dual in sqlite.
Update:
As I see,
fromcan be ommited, so the answer can be: