use row_number in Mysql

select emp_no , @i:=@i +1 as result  from employees, (select @i:=0) temp order by emp_no;

Comments

Popular posts from this blog

Project euler 169 found clue

Floyd-Warshall's algorithm