How can I run a MySQL query that selects everything that is not null? It would be something like
SELECT * FROM schedule WHERE ((all)) IS NOT NULL
I would not do this, but to replace someone else's horrible idea., especially do not do this -- this is what they suggested:
SELECT *
FROM SCHEDULE
WHERE ID || FOO || BAR IS NOT NULL;
Don't do this either, but at least it isn't as bad...
SELECT *
FROM SCHEDULE
WHERE coalesce(ID, FOO, BAR) IS NOT NULL;
This at least works on other versions of SQL, and some compilers will expand it to a series of IS NOT NULL.
Just do what the accepted answer says