1.
select
max(no)
from
table;
2.
如果第一种方法不行,可以先截取在比较
select
max(substring(no,2))
from
table
不需要通过字符串截取也可以找到最大值啊!!
select max(no1) from A
select MAX(convert(numeric,substring(No1,3,11)))
from A
不知道你的数据库系统.
试一试下面的语句看行不行
mysql: select right(No1,length(no1)-2) from A order by No1 desc limit 0,1
mssql select top 1 right(no1,len(no1)-2) from a order by No1 desc
直接以NO1降序排列后去第一条记录,不行吗?