select bottom

  • hi,

    my query must return the "last" n record, but "select bottom" not exists; is there another way ?

    Thanks,

    anakin

  • In order to get the top records you must be using the following syntax.....

    SELECT TOP n .......

    FROM.......

    ORDER BY [field]

    In order to get the 'last' records simply reverse the ORDER BY clause as follows......

    SELECT TOP n .......

    FROM.........

    ORDER BY [field] DESC

  • Thanks, it's right, easy question are always difficult question

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply