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

Null DB2


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

New User


Joined: 19 Sep 2005
Posts: 1

PostPosted: Mon Sep 19, 2005 6:24 pm
Reply with quote

Hi Freinds,

Emptab

name char(10) not null
id Char(10) not null
Sal char(10)

In this table, i want to select only those rows where sal should not be null.In this some of the rows have null values in the Sal column. I want to retrive only those rows where Sal is not equal to NULL.

for null we can have where sal is NULL, then what about vice-versa for this?

Regards,
Raags
Back to top
View user's profile Send private message
nitin4.a

New User


Joined: 16 Aug 2005
Posts: 26

PostPosted: Mon Sep 19, 2005 6:41 pm
Reply with quote

hi
null is like a condition for noops
so i think you can use this condition with if /else for vice versa i.e use else instead of if for sal not null
regards
sonu
Back to top
View user's profile Send private message
vikramyadav

New User


Joined: 28 May 2005
Posts: 41
Location: Gurgaon

PostPosted: Sat Oct 01, 2005 5:32 pm
Reply with quote

hi,
if you want to get the null value records in the salary column then just use the following query:------

select * from <table-name>
where salary 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 Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts the system or user abend SF0F R=NULL COBOL Programming 0
No new posts Uploading from desktop, a CSV file, s... DB2 2
No new posts How to handle NULL in COBOL program COBOL Programming 8
No new posts Change NULL indicator in UNLOAD utility DB2 2
Search our Forums:

Back to Top