sql server如何查询指定行?

转自:https://zhidao.baidu.com/question/84289452.html

select top 20 * from 表名 where id not in (select top 10 id from 表名)
///////////

select * from(
select
ROW_NUMBER()OVER(ORDER BY t.pk_id asc) as rowIndex,
t.*


FROM T_CORRECT_END t
INNER JOIN GET_CHILD_DEPT(579) a
on t.DEPT_PK=a.PK_ID


   where 
 
t.DR=0 and a.DR=0 and t.VSTATUS>=1
) t
where t.rowIndex>3
;




你可能感兴趣的:(SQL,Server)