📜  如何选择 SQL 数据库表中的第 n 行? - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:21.135000             🧑  作者: Mango

代码示例1
SELECT * FROM (
  SELECT
    ROW_NUMBER() OVER (ORDER BY key ASC) AS rownumber,
    columns
  FROM tablename
) AS foo
WHERE rownumber <= n