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
 

 

Does unique key allow more than one null value's

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
lal_arun_272

New User


Joined: 09 Oct 2006
Posts: 31
Location: Bangalore

PostPosted: Fri Oct 27, 2006 12:52 pm    Post subject: Does unique key allow more than one null value's
Reply with quote

Hi

If we defined one of table column as unique key. Does this column allow more than one null value's in that ??.

I got confused with below points ..in "In DB2 null is not equle to null"

So does it unique can have more than one null value's ??

Please help me to understand this

Thanks
Arunlal
Back to top
View user's profile Send private message

paresh.ojha

New User


Joined: 21 Sep 2006
Posts: 17

PostPosted: Fri Oct 27, 2006 1:17 pm    Post subject: Re: Null value in DB2
Reply with quote

NULL value means the value is undefined. NULL is not eqal to anything even NULL != NULL. So if you have any field in a table with NULL value you cant select the row with SELECT * FROM TBLNAME where FIELD = NULL rather than it should be SELECT * FROM TBLNAME WHERE FIELD IS NULL.

Hope this will help you.
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 Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts Command UNIQUE CONSTRAINT on any tabl... rohanthengal DB2 2 Thu Aug 18, 2016 3:48 pm
No new posts Converting NULL column into NOT NULL ... Raghu navaikulam DB2 5 Sat Aug 06, 2016 3:45 pm
No new posts Unique sort situation.... dbecker SYNCSORT 6 Wed Apr 27, 2016 8:53 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