update tbname,(select @i:=11) as a set type=concat('abc',if(length(@i:=@i+1)=2,concat('0',@i),@i)) where id=15
不知道对不对

解决方案 »

  1.   

    先谢谢!
    运行错误提示:
    You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT @i := 11 ) AS a
    SET litpic = concat(  'abc',  IF ( lengt
    我的MYSQL版本MySQL 4.0.21-nt
      

  2.   

    4。0不支持字查询的。但可以用join 代替
    5。0可以用子查询。