select * from AttendanceInfo pivot(max(AttendanceID) for cast(FaceTime as nvarchar(30)) in( [FirstTime],[LastTime]))a好像报错 “(”有错误,
MySQL行转列、列转行常用函数用法介绍 http://www.data.5helpyou.com/article388.html
不是那么追求效率的话程序里面转也是可以的