I have two record in the database with all the columns the same, the only columns which make difference between the two is a column called txnCo
. So the column which is inserted the next will have a higher value and I want to get the last one which is higher. In mysql I can use max function, but in Java I can not use math.max
since these are not numbers. So does anyone have any suggestion how to do it in the best way?
I am thinking of using the valueOf
function for each string and comparing the two.