Forum Discussion
sam870
Aug 11, 2022Copper Contributor
Null Question
Hello Guys, i am totally new and just started SQL 1 weeks age i have come across a problem in SQL suppose i am working on huge amount of data which is unclean and i want to find NULL & i know the s...
bake13
Microsoft
Aug 16, 2022Hi sam870 -- If I'm understanding correctly, you might be able to use the information_schema views to dynamically generate the select statements. Take care.
select 'SELECT * FROM ['+table_schema+'].['+table_name+'] WHERE '+column_name+' IS NULL' FROM INFORMATION_SCHEMA.COLUMNS order by TABLE_NAME,ORDINAL_POSITION