MySQL 添加序号列
来源:百度知道 编辑:UC知道 时间:2024/05/21 09:01:47
在表abc中添加一个自动添加的序号列num
表abc已存在!!!
表abc已存在!!!
alter table abc add num int unsigned auto_increment
如果同时为主键的话,可以这样写
alter table abc add num int unsigned primary key auto_increment
__________________________________________
to:数据库强者 不ok
可以证明你的那个库里面存在abc表
请先执行
drop table abc
然后再运行
create table abc
(
num int primary key not null identity(1,1)
)
ok!!
to :mxm_1123
嘿嘿
有问题请告之!