SQL Server - Limit m, n 기능 구현

1086 단어 데이터 뱅 크
1 상기 결과 중 7 조 에서 9 조 까지 의 기록 을 조회 하려 면 해당 하 는 SQL 문 구 는 다음 과 같다.
select top 3 id from tablename  
where id not in (  
  select top 6 id from tablename  
)

2. 제 m 조 에서 n 조 까지 기록:
select top (n-m+1) id from tablename  
where id not in (  
  select top m-1 id from tablename  
)  

발췌:http://blog.csdn.net/sjzs5590/article/details/7337541 미 완성 계속...

좋은 웹페이지 즐겨찾기