I have query:
select text_b, id from articles where title is not null;
But i want to show results where text_b is not null and length of text_b > 0. How to do it?
I have query:
select text_b, id from articles where title is not null;
But i want to show results where text_b is not null and length of text_b > 0. How to do it?
select text_b, id
from articles
where title is not null
and length(text_b) > 0;
or
select text_b, id
from articles
where title is not null
and text_b <> '';
or to properly handle null
values in text_b
select text_b, id
from articles
where title is not null
and text_b is distinct from '';