SELECT MAX(CAST(SUBSTRING(invoice_number, 4, length(invoice_number)-3) AS UNSIGNED)) FROM table
SELECT MAX(CAST(ID AS UNSIGNED)) FROM Read_UserSentence
https://stackoverflow.com/questions/16496874/how-to-select-max-of-mixed-string-int-column
https://stackoverflow.com/questions/5477762/using-cast-with-max-min
网友评论