Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Null value of an integer

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Null value of an integer
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

Site Director


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

PostPosted: Tue Sep 11, 2007 8:11 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Tue Sep 11, 2007 9:17 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 pm
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts Converting NULL column into NOT NULL ... Raghu navaikulam DB2 5 Sat Aug 06, 2016 3:45 pm
No new posts GetObjectArrayElement returns NULL Majid Hussain Java & MQSeries 2 Wed Mar 30, 2016 2:59 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us