Select from x th row next y rows

This code will show rows from 17th and then next 3 ordered by name from table authors in database pubs. Table must have primary key and of course ordered column. You can change value 'from' in line 'SET ROWCOUNT 17' and value 'next' (how many rows)in line SELECT TOP 3. It is good to show […]

2004-10-21 (first published: )

182 reads

Blogs

Daily Coping 21 Jan 2021

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

It’s 2021, so why are you reading this?

By

If you’re reading this, there’s a good chance you’re straight, white, male, and English-speaking....

Daily Coping 20 Jan 2021

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

Read the latest Blogs

Forums

Save results from Stored procedure to a CSV file.

By lee.hopkins

I have a SqlAgentJob calling a stored proc. that loops through a list of...

Search Report definitions

By dan-572483

I know that there is a query you can run in SQL to search...

Lookup and insert into column without dynamic SQL?

By kramaswamy

Hi all, 99% sure the answer to this question is "it is not possible",...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers