I have the following database:
+-------------+
| rd |
+-------------+
| 65000807:11 |
| 65000807:9 |
| 65000809:10 |
+-------------+
I would like to select the biggest value, which is 65000807:11 (the biggest number after the :). With the following query, I can get 11, but I need to get the whole string. How could I do that?
SELECT MAX(CAST(SUBSTRING(rd,10,length(rd)-9) AS UNSIGNED)) AS 'rd' from myTable;