IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

to get column names which has null value from table


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
skam

New User


Joined: 31 Jul 2006
Posts: 1

PostPosted: Mon Jul 31, 2006 5:48 pm
Reply with quote

hi,
Pls help me to ,write a query to select the column name which has null value from a table
regards
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Mon Jul 31, 2006 10:25 pm
Reply with quote

Skam,

Hope the below query will work

Quote:
select * from tab1 where col1=null
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Tue Aug 01, 2006 1:38 am
Reply with quote

Can you explain your requirement in more detail for us? Do you want to select the row data where a specific column name is null, or do you want to select the 'column_name' for any column that is null in a row, or select the column_name for any column that is null in the table, or do you want to select column_names for columns that could be null?

Please come back

Dave
Back to top
View user's profile Send private message
chiranjeevi_mca

New User


Joined: 19 Feb 2006
Posts: 27

PostPosted: Tue Aug 01, 2006 5:42 pm
Reply with quote

Select * from table where COL1 IS NULL;


the above query will retrieve the rows for col1 is null
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts How to load to DB2 with column level ... DB2 6
No new posts RC query -Time column CA Products 3
Search our Forums:

Back to Top