1
I need to make a Rigger that prevents the same employee from being part of more than one crew on the same day.
The crew table is as follows:
Tripulação = {id_Voo, data, id_Funcionário }
The 3 attributes are together the primary key.
What I want to do here is to see if it already exists in the same table row Tripulação
the :new.id_Funcionário
and :new.data
.
I believe it is enough to define these two fields as
Unique
to solve the problem. You don’t need Trigger.– Franchesco
@Earendul is for academic work
– Daniela Maia
Won’t that work for you? http://www.experts-exchange.com/questions/21270418/Check-if-exists-trigger.html#a13018305
– Franchesco
You need to create an account to see this answer.
– Daniela Maia
Yeah, before I could see, now I can’t see :(
– Franchesco