My Blog List

Tuesday, March 19, 2013

use row_number in Mysql

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

No comments:

Post a Comment