Good day
I have a table with a dozen columns and i'm looking for a query that will return rows that only have specific columns filled up. So it shouldn't return rows where 'illegal' columns are filled up.
Something like:
SELECT * FROM table WHERE col1 is NOT NULL
AND all_other_cols is NULL;
^ i know it can be done by listing every other column and indicating "not NULL", but is there another way of doing this?
Hopefully this makes sense
UPDATE:
Based on the answers below I'll just use "DESCRIBE my_table;" then build a query that will filter all unwanted columns with 'is NULL'
COALESCE.