• So you want to know how many non-null values are stored in each column in each table and how many total rows in the table?

    For example I have tableA(id int PK, col1 varchar(10) Not Null, col2 Varchar(10) Null) with 10 rows. You want a return something like this:

    TableName RowCount ColumnName Nulls Non-Nulls

    ---------- --------- ------------ ---- ---------

    tableA 10 id 0 10

    tableA 10 Col1 0 10

    tableA 10 Col2 3 7