mysql> SELECT @rownum:=@rownum+1 AS rownum, FLIGHTS.FLTID FROM (SELECT @rownum:=0) r, FLIGHTS limit 10;