I have a unique string column in my database table. The table consists of data column and removed column. If I try to insert a duplicate string into that unique column, it will show duplication error which is what I want. My removed column will indicate 0 as exist, 1 as doesn't exist.
When I try to add the unique string to data column whereby the removed column is 1 (doesn't exist), the query will returns duplication error.
What I want
id data removed
1 hello 0
2 haha 1 <- remove column, so data column will ignore unique data
3 haha 0 <- New data
How do I insert the unique string into data column with removed equal to 0?