Home > database > SQL database to calculate rate of null values
SQL database to calculate rate of null values
Time:09-16
Want to ask, I think it's time to a stored procedure can be counted a null values of each field in the table, is the number of null values than the total number, but how can you do it by variable cycle each field in the table? Ask god to reassure it
CodePudding user response:
Dynamic SQL, the field name to obtain through user_tab_columns view
CodePudding user response:
But if the real time requirement is not high, recommend to collect statistics, query user_tab_col_statistics view to calculate the rate of a null value