SQL SERVER - Trigger to restrict over 3 records
问题 I am a beginner on SQL and need help setting a Trigger I need to set a trigger so that if 1 tutor has over 3 different schedule ID's this is not allowed!! Table TutorID/ScheduleID/Student 1 1 Tom 1 1 Harry 1 1 Lima 1 2 Zany 1 2 Logan 1 3 Zoe 1 3 Lana Tutor ID/ Tutor Name 1 Sam how can I restrict someone from inserting another class? 回答1: DISCLAIMER: To be completely honest I'm not convinced doing this through a SQL Trigger is the best solution, far better to control this sort of thing through