Solved using this code! UNIQUE KEY `Index` (`uid` , `name`);