Creates
UNIQUE
index for students not to have duplicate notes. The index is created with two fields
student_id
and
title
to make sure that student will not have more than one note with the same title
ALTER TABLE `notes` ADD UNIQUE `unique_student_note` (`student_id`, `title`);
Note: Several notes with the same name are allowed if they are created by different authors
by Valeri Tandilashvili
4 years ago
MySQL
Full MySQL Course for Beginners
1
Pro tip: use ```triple backticks around text``` to write in code fences