Using MAX() in VARCHAR Field

前端 未结 6 2040
清酒与你
清酒与你 2021-02-20 06:39

I have a table with following set of data

ID (VARCHAR2 field)
D001
D002
D010
D0012

I use max() in this field.

Sele         


        
6条回答
  •  [愿得一人]
    2021-02-20 06:49

    This will surely work.

        select MAX(CAST(REPLACE(REPLACE(ID, 'D', ''), '', '') as int)) from 
    

提交回复
热议问题