Reputation: 273
I have a table that looks like this:
I want to create a trigger, which doesn't allow new inputs of (Dita AND Ora AND Salla) if they already exist in database as a group of values.
To be more specific, if a record exists with Hane, 12:00, 621. Do not allow it to be inserted!
Upvotes: 0
Views: 90
Reputation: 273
ALTER TABLE fiekorari
ADD UNIQUE INDEX duplli (Dita, Ora, Salla);
Upvotes: 2