I know about creating unique index. But My problem is bit different. I want uniqueness check for different states for the same column.
For example. Table contains column Money_Transfer_status, now it can be pending, in_progress, approved, rejected etc.
Now for a given user if there is an in_progress or pending status I do not want to add new money transfer for the user, else it should be okay.
Is there some way in DB I can specify this?