if not object_id('Tempdb..#T') is null drop table #T Go Create table #T([ID] ),[Memo] nvarchar()) Insert #T ,N'A',N'A1' union all ,N'A',N'A2' union all ,N'A',N'A3' union all ,N'B',N'B1' union all ,N'B',N'B2' Go --I.Name相同ID最小的记录(推荐用1,,),方法3在SQl05时,效率…