Select row number in MySQL

Submitted by:Pitter Alderson

Date added:26 February, 2015

Category:MySQL

Simple and easy mySQL code to select the row number

Tags: select row , row number

Code Snippet:

SELECT @row := @row + 1 AS row, t.*
FROM some_table t, (SELECT @row := 0) r
 
 

Comments