0

I am working on one major issue where I have to add some constraint or need a way by which only this combination is allowed.

Table User (Strind id, String status) User Table
primary key Id String   Status Integer
1   id1 1   Allowed
2   id1 0   Allowed
3   id1 0   Allowed
4   id1 1   not Allowed as row 1 already exist

only single id is allowed with value status 1. How can i write the constraint or how to solve this issue. mysql database Thanks, Hasnain

Hasnain Ali Bohra
  • 2,130
  • 2
  • 11
  • 25

0 Answers0