Good day. There is a table of vehicles_char_of_vehicles (vehicle_id - FK, charact_id - FK, value). How to make it so that it is impossible (by mistake) the same values: 1 - auto, 1 - load capacity, 2000 - sign and second record 1, 1, 3000. Through the unique field, I will simply make it so that one characteristic can be entered once, for example, for the first truck in char_id - 1, value - 2000, and the entry char_id - 1, value - 3000 - for the second truck, there will already be an error, since cgar_id is unique. How to achieve what I need?
create unique index NAME on Table(v_id, c_id)- Mike