日期:2014-05-18 浏览次数:20408 次
declare @T table (id int,wc varchar(10),wd int) insert into @T select 1,'a',12 union all select 2,'a',13 union all select 3,'fdf',12 union all select 4,'f3d',13 union all select 5,'22',14 update @T set wc=wc+'+1' from @T t where id=(select max(id) from @T where wd=t.wd) select * from @T /* id wc wd ----------- ---------- ----------- 1 a 12 2 a 13 3 fdf+1 12 4 f3d+1 13 5 22+1 14 */
------解决方案--------------------
Mysql的跑这来干啥啊?语法不一样,你去相应的板块问问嘛