I can open a trip only once but can close it multiple times. I can not declare the Trip_no + status as primary key since there can be multiple entries while closing the trip. Is there any way that will assure me that a trip number is opened only once?
For e.g. there should not be the second row with "Open" status for trip No. 3 since it is already there in the following table.
Trip No | Status
1 Open
1 Close
1 Close
2 Open
2 Close
3 Open
3 Close
3 Close
3 Close
3 Close