1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[SQL] How to select between the top 50 and 100 returned (queried) rows in sql?

Discussão em 'Outras Linguagens' iniciado por Stack, Julho 23, 2021.

  1. Stack

    Stack Membro Participativo

    SELECT TOP(100) * FROM dbo.users
    EXLUDE TOP(50)
    WHERE users.name = 'John'
    ORDER BY users.name


    Is there something like my code above? Essentially, I am attempting to NOT select the first 50 records that return with the name John, but the second set of 50 (51-100). I'd like to change this range as needed (to anything from 51-100 to 879-1013, not literal).

    The record identity number will not help as John, then Sally, then Kate, then another John may have signed up, so I don't believe that WHERE BETWEEN will work....

    Continue reading...

Compartilhe esta Página