给已经建好的表加上唯一性约束

给已经建好的表加上唯一性约束
ALTER TABLE `users` ADD unique(`username`);

猜你喜欢

转载自blog.csdn.net/qq_40312194/article/details/82527004