I have supplier table with supplier id as the primary key. I have a supplier type column which can be airline (AL), hotel (HT), Tour (T).
For the supplier type airline (AL) I want the airline_type and airline_abbr columns to be composite unique as well as the airline_type and airline_iata_code to be composite unique.
I don’t want to set this as the primary key because primary key is already declared.
How to go about it? Any ideas or suggestions?
Thanks,
You can create unique filtered indices on your table:
You can read more about what filtered indexes are and how to use them in Pinal Dave’s excellent blog post on the topic