I have a varchar column that has data like this
top<somenumber>
so the word 'top' followed by numbers. I am trying insert a record in this table and am trying to find out what is the next value that should go in.
Is there anyway I can find the max value for this column?
maybe something like this?
select * from catalog ORDER BY CAST(`catalogid` AS DECIMAL(10,2)) DESC limit1;
how can i mold the above query to account for only numbers followed by 'top'