mysql建表且某字段内不允许出现重复值

CREATE TABLE `admin` (
`id`  int(10) NOT NULL AUTO_INCREMENT ,
`username`  varchar(50) NOT NULL ,
`password`  varchar(50) NOT NULL ,
`table_name`  varchar(50) NOT NULL ,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
)
;

 

posted @ 2016-06-17 11:55  wong。  阅读(3748)  评论(0编辑  收藏  举报