📜  自定义行号 - SQL 代码示例

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

代码示例1
SET @row_number = 0; 
SELECT 
    (@row_number:=@row_number + 1) AS num, 
    firstName, 
    lastName
FROM
    employees