I have a A
table with a start_date
field and another end_date
.
I have a B
table with a date
field.
Is there any way to ensure that a record is only saved in B
when B.date
is between A.start_date
and A.end_date
?
I know how to do this by inserting via PHP. But I want to know if there is anything that can be done in the Bank that guarantees this kind and integrity. I'm looking for something in the line of action of the constraints (but any solution is welcome!)