1
I have a land register table with several columns (some of them: id, address, city, proposal, etc) and I would like to count how many fields are empty.
For example, the table has a total of 44 columns, if there are only 20 fields filled, the sql query should bring the result 24, which are blank or null.
It is possible to do this?
He has to search for land and must present the table so that the person knows how many fields he has not filled and is missing:
ID terreno|camposembranco
1 | 5
2 | 2
3 | 0
I don’t understand if you want to check this by row or in the table as a whole.
– bfavaretto
in the table as a whole, are land registrations, then I need to know how many fields have not been filled, for example, not filled only the city, then I will show that there is 1 field to be filled, I will edit the question to get better
– Leandro Marzullo
So it’s by line. I mean, you want to know that the city is missing for land X. Or whether the city is blank for ALL land?
– bfavaretto
sorry, that, per line, ID line type 2 missing 5 fields, ID line 7 missing 8
– Leandro Marzullo