mysql修改主键自增语句
2014-04-07 20:25
274 查看
alter table tablename change tableprimary tableprimary smallint auto_increment
注解:tablename 表名tableprimary 主键 自动增加键
如上修改必须重复写两次主键名:如:
alter table users change usrid usrid smallint auto_increment;
相关文章推荐
- sql语句修改mysql表的自增主键
- mysql修改主键自增长时报错
- mysql alter 语句用法,添加、修改、删除字段、索引、主键等
- mysql 语句,修改列名,列类型和关键字问题
- MySql语句大全:创建、授权、查询、修改等
- MySQL语句大全:创建、授权、查询、修改等
- MYSQL学习记录:修改表语句
- MySQL修改表属性的SQL语句
- Mysql学习总结(3)——MySql语句大全:创建、授权、查询、修改等
- 不停机修改线上 MySQL 主键字段 以及其带来的问题和总结思考
- MySql语句大全:创建、授权、查询、修改等
- mysql一条语句修改A表数据等于B表数据
- mysql 如何修改、添加、删除表主键
- MySQL创建表语句包含主键、索引、约束
- 获取缺失主键表信息的MYSQL语句
- Mysql语句的批量操作[修改]
- MySQL语句大全:创建、授权、查询、修改等
- MySQL修改表属性的SQL语句
- [置顶] 【mysql 增删改查】MySql数据库的查询、删除、增加、修改语句
- mysql添加主键,修改自增长值