MySQL get row position in ORDER BY
问题 With the following MySQL table: +-----------------------------+ + id INT UNSIGNED + + name VARCHAR(100) + +-----------------------------+ How can I select a single row AND its position amongst the other rows in the table, when sorted by name ASC . So if the table data looks like this, when sorted by name: +-----------------------------+ + id | name + +-----------------------------+ + 5 | Alpha + + 7 | Beta + + 3 | Delta + + ..... + + 1 | Zed + +-----------------------------+ How could I