How To Return Line Numbers In MySQL
erics, October 14th, 2011
1 2 3 4 5 6 |
SELECT @rownum := @rownum + 1 AS Rank, T1.* FROM (select @rownum := 0) R, ( SELECT Category, Item, Value FROM Inventory WHERE lastUpdated = CURDATE() ORDER BY Value DESC ) AS T1 WHERE T1.Item = "Camera" |