SQL - Select first 10 rows only?

后端 未结 12 659
时光取名叫无心
时光取名叫无心 2020-11-28 03:24

How do I select only the first 10 results of a query?

I would like to display only the first 10 results from the following query:

SELECT a.names,
            


        
12条回答
  •  伪装坚强ぢ
    2020-11-28 03:46

    In standard SQL you can use:

    ... FETCH FIRST 10 ROWS ONLY

    This is supported in DB2, PostgreSQL and Oracle 12.1 (and later)

提交回复
热议问题