Click here to Skip to main content
15,904,339 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How to display all null columns from a particular table
I Means the Columns which contain Only null values.
Posted
Updated 10-Aug-11 23:03pm
v2
Comments
thatraja 10-Aug-11 5:32am    
Elaborate more.
Corporal Agarn 10-Aug-11 10:41am    
Do you mean the columns with nulls or as d@nish is showing columns that can be null?
LaxmikantYadav 11-Aug-11 5:43am    
Can you explain more ?
[no name] 12-Aug-11 2:07am    
Please add more

1 solution

Is this what you are looking for:

SQL
select name from sys.syscolumns where id in (select ID from sys.sysobjects where name = 'Table_Name') and isnullable=1
 
Share this answer
 
Comments
[no name] 12-Aug-11 2:06am    
This will show only the nullable columns, is that the question means?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900