1, rownum between ? and ? 사용한다. Select * from test_t where a=1 limit 0,10; My-SQL 경우(row 1 ~ 10 리턴) Select * from test_t where a=1 and rownum between 1 and 10;
2, Groub by 절이 포함된 경우에는 having groupby_num() 을 사용한다. Select a, count(b) from test_t group by id limit 0,10 ; Select a, count(b) from test_t group by a having groupby_num() between 1 and 10;
3, Order by 절이 포함된 경우에는 for orderby_num() 을 사용한다. Select a, b from test_t order by a limit 0,10; Select a, b from test_t order by a for orderby_num() between 1 and 10;
안녕하세요.!
my-sql limit 사용방법은 아래와 같이 사용할 수 있습니다.
1, rownum between ? and ? 사용한다.
Select * from test_t where a=1 limit 0,10; My-SQL 경우(row 1 ~ 10 리턴)
Select * from test_t where a=1 and rownum between 1 and 10;
2, Groub by 절이 포함된 경우에는 having groupby_num() 을 사용한다.
Select a, count(b) from test_t group by id limit 0,10 ;
Select a, count(b) from test_t group by a having groupby_num() between 1 and 10;
3, Order by 절이 포함된 경우에는 for orderby_num() 을 사용한다.
Select a, b from test_t order by a limit 0,10;
Select a, b from test_t order by a for orderby_num() between 1 and 10;