I want to return for each row, id and a comma separated list of column names that value is null/empty.
e.g. table name applicants
id | name | age | location
1 | Matt | null | london
2 | Luis | 24 | paris
3 | null | null | germany
4 | James | 28 | null
So the query results would look like:
id| missing
1 | age
3 | name,age
4 | location
I know how to return the rows but not the column names in a comma separated list/.
SELECT * FROM `applicants` WHERE name='' OR age='' OR location=''
How do i solve?