| IBM MAINFRAME HELP FORUMS for COBOL, JCL, CICS, DB2, IMS etc... Help & Support Forums for IBM Mainframe computers Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7, CA-11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, VSAM, ISPF, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
|
| View previous topic :: View next topic |
| Author |
Message |
simimathew
Joined: 26 Jan 2006
Posts: 17
Location: London
|
| Posted: Tue Jul 08, 2008 9:26 pm Post subject: Unique Index on duplicate value column |
|
|
Hi,
1) Can a unique index be created on a column that already has duplicate values? I tried doing it on DB2 UDB and it is not letting me create a unique index.
2) But I remember having read somewhere that two nulls are considered to be equal for UNIQUE indexing purposes. How do you create a UNIQUE INDEX on an already existing nullable column?
3) Also could you please point out the difference between primary key and unique index?
Many Thanks,
Simi |
|
| Back to top |
|
ashimer
Joined: 13 Feb 2004
Posts: 313
Location: Bangalore
|
| Posted: Wed Jul 09, 2008 3:02 pm Post subject: |
|
|
Quote:
somewhere that two nulls are considered to be equal
Only a single null value is allowed in an UNIQUE indexing column ...
Primary key will not allow any NULL ...
Unique itself means no duplicates are allowed ... |
|
| Back to top |
|
simimathew
Joined: 26 Jan 2006
Posts: 17
Location: London
|
| Posted: Wed Jul 09, 2008 3:18 pm Post subject: Reply to: Unique Index on duplicate value column |
|
|
| Thanks very much. |
|
| Back to top |
|
| |
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM
|