获取当前记录是表中的第几条

SET @x =0;
SELECT @x := ( IFNULL( @x , 0 ) +1 ) AS rownum, id
FROM  `product`
This entry was posted in MySQL and tagged . Bookmark the permalink.

Comments are closed.