Hallo Ich habe eine Tabelle data_table .I brauchen alle Titel aus dem Tabelle.Die Titelfeld (Typ varchar) wie alphanumerische Daten enthalten, erhalten unterMy SQL-Sortierung varchar Feld mit numerischen Teil
title
---------
ab 2007
ab 2017
ba 2018
ba 2017
cd 2017
cd 2016
meine Wunsch Ausgang ist
title
---------
ba 2018
ab 2017
ba 2017
cd 2017
cd 2016
ab 2007
ich von CAST .Aber versucht Ergebnis
SELECT title, CAST(title as SIGNED) AS casted_column FROM data_table ORDER BY `title` DESC
Heimlich, ich glaube, du weißt was zu tun ist – Strawberry