- 查询最后一条符合条件的语句
select * from tablename where xxx order by id desc limit 1;
- 自动递增数值设置为从1开始(auto_increment值重新开始从1计数)
truncate = drop + create
truncate table 表名称;
- 查询表中某个字段值重复的记录
select *, count(*) as sumcount from tablename group by 字段名 having sumcount>1;

2万+

被折叠的 条评论
为什么被折叠?



