I have a primary key constraint to my column, i disabled it and inserted duplicate values into the column after how can I enable the primary key constraint
Loading
I have a primary key constraint to my column, i disabled it and inserted duplicate values into the column after how can I enable the primary key constraint
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh KumarPosted Oct 12, 2022, 4:48 AM
Hi Rajesh,
First of all if you have duplicate data in that table then you can not set primery key to column. You need to take back up of that table then create primary key and insert data from backup table after removing duplicate record.
Rajanikant HawaldarPosted Oct 11, 2022, 2:34 PM
No it won't allow in any case, that is difference between constraints and rules. If you implement constraints it will check the previous data also, but if you implement rule in that case then no problem you can have the dublicates, but here also after implementing rule you are not allowed to put dublicates