I’ve inherited a legacy database, and many, many fields are no longer being used. I can tell by querying on the last couple of years and seeing which fields are null, to at least get a baseline for where I might look.
Is there an elegant way to figure out which fields in the database are null for all records in a given set?
Any columns that come out 0 have all nulls (unless the Total_Count column also comes out 0, in which case the table is empty). Note that this query will be pretty expensive on a large table.