MySQL中怎么把姓张的改成姓李的 MySQL中怎么查看倒数第二行的数据

[复制链接]
查看11 | 回复2 | 2013-8-1 09:11:21 | 显示全部楼层 |阅读模式
第一个用replace函数。update tablename set name = replace(name, '张', '李') where name like '张%';第二个用Limit关键词。select *from tablenameorder by col desclimit 1, 1;...
回复

使用道具 举报

千问 | 2013-8-1 09:11:21 | 显示全部楼层
updata table set name=concat('李',substring(name, 1)) where name like '张%';select * from table order by somefiled desc limit 1,1;...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行