How to skip the first n rows in sql query

前端 未结 11 974
清歌不尽
清歌不尽 2020-12-09 01:40

I want to fire a Query \"SELECT * FROM TABLE\" but select only from row N+1. Any idea on how to do this?

11条回答
  •  自闭症患者
    2020-12-09 02:06

    In order to do this in SQL Server, you must order the query by a column, so you can specify the rows you want.

    Example:

    select * from table order by [some_column] 
    offset 10 rows
    FETCH NEXT 10 rows only
    

提交回复
热议问题