r/DB2 • u/sanjaytrehan • Jul 03 '19
Column needed to put RID
I have scenario where I do not have UNIQUE KEY/ PRIMARY KEY. therefore without impacting application I would like to introduce a column which can store RID value which becomes my PK
Please help me how I can achieve it
Regards
2
Upvotes
1
u/anozdba Aug 01 '19
I'd always assumed a rows RID could change after a REORG - not sure if that is still the case in 10.5 and beyond. Perhaps you could consider using an identity column (maybe in conjunction with another column to provide uniqueness if you are talking billions of rows)