Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

List all columns having only nulls from all tables in a database.

$
0
0

I want to select columns from all tables having only null values. Each table has 60+ columns and i have 100+ tables in database. Requesting a script to list all tables at a time and their columns having all nulls? Below is my expected output. Thank you in advance !

Table nameNull valued Column
AddressAddress Line 2
AddressAddress Line 3
AddressZip Code
ProductProduct Desc
ProductProduct SKU


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>