The reason is that the data of
REGCOUNT_T
column may be in text type, in which case 10 comes before 9, so 9 is returned as maximum value.
To get the correct result either convert the value of
REGCOUNT_T
to numeric type as below
SELECT MAX(CONVERT(INT,REGCOUNT_T)) AS RUNCOUNT FROM FEEDBACK_DATA
or set the data type
REGCOUNT_T
to a numeric type like
INT
.