问题描述:

I am working on db2 database.I want to get max value from a column.That column is of varchar type and has alphanumeric values such as

abc100

, abc101

,abc102......

I want to get 'abc102' as a result.

Thanks in advance.

网友答案:

Use max():

select max(col)
from t;

Your data is such that the alphabetical maximum is what you are looking for.

相关阅读:
Top