Mysql
 sql >> Database >  >> RDS >> Mysql

Come si seleziona ogni n-esima riga da mysql

SELECT * 
FROM ( 
    SELECT 
        @row := @row +1 AS rownum, [column name] 
    FROM ( 
        SELECT @row :=0) r, [table name] 
    ) ranked 
WHERE rownum % [n] = 1