In MySQL, If you have an existing table and you wanted to have unique index across multiple columns.
This is very useful in implementing unique constraints. Please checkout the code snippet below.
ALTER TABLE `prefix_counter` ADD UNIQUE `unique_prefix_counter`(`prefix`, `year`);