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

Null value of an integer


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

New User


Joined: 20 Feb 2006
Posts: 34

PostPosted: Tue Sep 11, 2007 5:55 pm
Reply with quote

Hello,

i have null value populated for an integer field in a column in database.

if i run this query
select * from
tab
where
column <> 10;

will this query return 100 or 0?

Regards
Rashmi
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Sep 11, 2007 8:11 pm
Reply with quote

Hello,

What happens when you run that query on your "null" column?
Back to top
View user's profile Send private message
rashmi.ranjan75

New User


Joined: 20 Feb 2006
Posts: 34

PostPosted: Tue Sep 11, 2007 9:14 pm
Reply with quote

when i run this query it returns 100 but as per my understanding it should return the record. So i just want to know if it is normal that this query should return no record.

Thanks for your help.

Regards
Rashmi
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Sep 11, 2007 9:17 pm
Reply with quote

Hello,

Yes, i believe it is normal for the query to return no rows if all of the rows have a null valuein the column used for selection. It is neither equal nor not equal - it does not exist.
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