发布网友 发布时间:2022-04-08 19:49
共2个回答
热心网友 时间:2022-04-08 21:19
select MAX(CAST(x.serial as SIGNED))+1 as number from (select SUBSTRING(GOODS_ID,LOCATE('005001007',GOODS_ID)+LENGTH('005001007')) as serial from BUS_GOODS where ID like '%005001007%') x where x.serial <> ''
热心网友 时间:2022-04-08 22:37
你的x是后面的子查询的别名是吧,可是在最外层的select 时[select MAX(CAST(x.serial as SIGNED))+1 as number ]临时表的别名还没有创建