How to select top N from a table

后端 未结 9 839
醉酒成梦
醉酒成梦 2020-12-11 21:18

I have to select the top 25 records from a table according to the column Num.

There are two issues. First, the table is not sorted by Num.

9条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-11 21:37

    Depending on the database implementation you're using, it could be using the limit statement (as one other answer suggests) or it could be like this:

    SELECT TOP 25 Num, blah, blah ...
    

提交回复
热议问题