只需一条语句搞定 select right(10000001+isnull(max(right(field,7)),0),7) from table
select right(10000001,7) ------从右侧开始截取 7位 结果0000001
isnull(max(right(field,7)),0) 先截取7位 判断是否是null 是则 为0 否则 为截取的整数值
很好用的!
只需一条语句搞定 select right(10000001+isnull(max(right(field,7)),0),7) from table
select right(10000001,7) ------从右侧开始截取 7位 结果0000001
isnull(max(right(field,7)),0) 先截取7位 判断是否是null 是则 为0 否则 为截取的整数值
很好用的!