举例来说:select max(indate) indate,no from T1 with (nolock) group by no写一个专门对T1表求Indate最大值的函数maxindateselect dbo.maxindate(no) indate,no from T1 with (nolock) group by no呵呵