need assistance with query

  • Hello all!

    How could I return the top ten highest values in a column? WOuld it be somewhere along the lines of Select Top(10) StudentScore from dbo.Employees?

    The output would be along the lines of this:

    100

    99

    66

    54

    33

    etc...Does anyone know how? thanks

  • what happened when you tried it?

    looks like the only thing missing is the ORDER BY clause to force a sort in descending order (so you get the highest values)

  • use select statement followed by order by columnname DESC

    --Pra:-):-)--------------------------------------------------------------------------------

  • Ok...that makes sense..I kept thinking I was doing something wrong. thanks guys.

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

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