ITeye博客

mysql 字段操作

TimerBin · 2015-01-08 20:24 · mysql · Markdown

一、修改Mysql 字段类型

alter table t_orm_timerorm modify column t_name varchar(255);

 

二、修改mysql字段为自增字段

create table t_orm_timerorm(
    id bigint  primary key,
    t_name varchar(255)
}
--需要定义自增键为一个主键
alter table t_orm_timerorm modify id bigint auto_increment ;  
否则会出现如下错误:(具体为什么还未查出)
 1075. Incorrect table definition; 
      there can be only one auto column and it must be defined as a key

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。