SELECT A.* FROM
(
SELECT @rownum:=@rownum+1 AS rownum, cms_user.*
FROM (SELECT @rownum:=0) r, cms_user
) A WHERE rownum *4 <= (SELECT COUNT(1) FROM cms_user)
mysql数据库查找前25%的数据
最新推荐文章于 2022-01-06 10:46:05 发布
SELECT A.* FROM
(
SELECT @rownum:=@rownum+1 AS rownum, cms_user.*
FROM (SELECT @rownum:=0) r, cms_user
) A WHERE rownum *4 <= (SELECT COUNT(1) FROM cms_user)