Lets say that I have a table which contains a column for invoice number, the data type is VARCHAR with mixed string/int values like:
invoice_number
*********
Your problem is more one of definition & design.
Select the invoice number with highest ID or DATE, or -- if those really don't correlate with "highest invoice number" -- define an additional column, which does correlate with invoice-number and is simple enough for the poor database to understand.
select INVOICE_NUMBER
from INVOICE_HEADER
order by ID desc limit 1;
It's not that the database isn't smart enough.. it's that you're asking it the wrong question.