SQL 行号无分区

示例

根据指定的顺序添加行号。

SELECT
  ROW_NUMBER() OVER(ORDER BY Fname ASC) AS RowNumber,
  Fname,
  LName
FROM Employees