标签:word use table add varchar 方法 creat ble ODB
CREATE TABLE `t_user` (
????? `Id` int(11) NOT NULL AUTO_INCREMENT,??-- 自增
????? `name` varchar(18) NOT NULL unique,??-- 唯一性约束
????? `password` varchar(18) NOT NULL,
PRIMARY KEY (`Id`)
) ENGINE=InnoDB AUTO_INCREMENT=1018 DEFAULT CHARSET=utf8;
alter table 表名 add unique(字段名);
栗子:alter table user add unique(name)
标签:word use table add varchar 方法 creat ble ODB
原文地址:https://www.cnblogs.com/5Arno/p/13339546.html