For example, I have to program an enrolment table which has:
- enrolment_id
- academic_period
- results
- student_id
- subject
I want to enforce to make sure that a student can't enroll in a subject more than once in a specific academic period.
So, the constraint shall involve student_id, subject, and academic period columns.
I'm still unsure how do I make this happen. Any help?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…