mysql
izhangtt
这个作者很懒,什么都没留下…
展开
-
Mysql常用语句
1、查某个表的内容select * from table_name;2、修改某字段的值,例如修改formContent的值为content,where后加判断条件update table_name set formContent='content' where id='80b3e0e48';原创 2021-04-22 10:57:37 · 82 阅读 · 0 评论 -
MySQL 非主键设置自增
有个需求:需要给数据列表添加一个序号(序号为1、2、3....),需要自增alter table table_name add num(序号) int auto_increment not null Unique;需加unique才能设置自增成功,否则会报错Incorrect table definition; there can be only one auto column and it must be defined as a key...原创 2021-04-19 14:15:26 · 1226 阅读 · 0 评论