LEAD函数简单点说,就是把下一行的某列数据提取到当前行来显示,看示例更能解释清楚,先看测试用脚本 DECLARE @TestData TABLE( ID INT IDENTITY(1,1), Department VARCHAR(20), LastName VARCHAR(20), Rate FLOAT ) INSERT INTO @TestData(Department,LastName,Rate) SELECT 'Document Control','Arifin',17.7885 UNI…