I have a simple query like this that go over my mysql records of certain table and gives me jsons out of each record:
SELECT json_object(
'personId', p.id,
'formalName', p.name,
'country', p.country)
FROM person p;
but I formalName can be null, and I wanted to add a condition like
if p.name is null 'NoName' else p.name
is it possible?