This should work:
SELECT field,CONVERT(SUBSTRING_INDEX(field,'-',-1),UNSIGNED INTEGER) AS num
FROM table
ORDER BY num;
More Related Contents:
- If two columns are 1 then make new column
- How can I return pivot table output in MySQL?
- Using LIMIT within GROUP BY to get N results per group?
- Group by clause in mySQL and postgreSQL, why the error in postgreSQL?
- Retrieving the last record in each group – MySQL
- Cast from VARCHAR to INT – MySQL
- Required to join 2 tables with their FKs in a 3rd table
- Does COUNT(*) always return a result?
- How to change the CHARACTER SET (and COLLATION) throughout a database?
- Connect By Prior Equivalent for MySQL
- Mysql::Error: Specified key was too long; max key length is 1000 bytes
- How to convert all tables from MyISAM into InnoDB?
- How can I get around MySQL Errcode 13 with SELECT INTO OUTFILE?
- SQL Query to show nearest date?
- How to create relationships in MySQL
- Order by COUNT per value
- Select from one table where not in another
- MySQL Select last 7 days
- How to select the most recent set of dated records from a mysql table
- Second SELECT query if first SELECT returns 0 rows
- Set value to NULL in MySQL
- SELECT query return 1 row from each group
- MySql Single Table, Select last 7 days and include empty rows
- mysql SQL: specific item to be first and then to sort the rest of the items
- How to retrieve JSON data from MySQL?
- When is a timestamp (auto) updated?
- INSERT INTO Table from multiple tables
- Execute INSERT if table is empty?
- Mysql How do you create a clustered index?
- How do I extract Month and Year in a MySQL date and compare them?