I need to count how many empty fields a row contains in an SELECT COUNT(*) statement
My row holds 11 fields and i only need to count in 4 of them.
In two of the columns i need to count if they are empty (NOT NULL), and in two i need to count if they hold the value 0
My statement so far:
SELECT COUNT(*) AS subjectcount FROM Tabel WHERE (col1 OR col2) =0 OR (col3 OR col4) = '' AND id=1