1.Mysql显示行号
SELECT tn.*, (@row_num := @row_num + 1) AS rowNum FROM table_name tn, (SELECT @row_num := 0) t;
2.Oracle显示行号
SELECT row_data.*, ROWNUM FROM ( SELECT * FROM table_name) row_data;
3.SqlServer显示行号
SELECT *, row_number() OVER(ORDER BY id) AS rowNum FROM table_name;