We used the CourseID rather than the Title in the DELETE statement criteria because:
- The CourseID is the primary key for identifying each unique record in the Course table. It will unambiguously identify the single record we want to delete.
- The Title could potentially match multiple records if the same course title was used more than once. Using the Title would risk deleting multiple records instead of just the intended one.
- Best practice is to always use the primary key field(s) to identify records when querying, updating, or deleting in order to ensure only the intended record(s) are affected.
So in summary, by using the CourseID we can be certain to only delete the single intended record, rather than