Create auto numered column in mysql query select @rownum:=@rownum+1 nowef, p.* from item p, (SELECT @rownum:=0) r order by item_code desc limit 10;
Hello, I'm not entirely sure what you are asking, but if you're looking for a solution to automatically number every row in a MySQL table, than the most easy solution would be to use the AUTO_INCREMENT attribute.