#排重

.Net LIst排重

publicclassTest{publicintID{get;set;}publicstringName{get;set;}}publicclassTestMain{  publicstaticvoidTestMothod()  {  List<Test>testList=newList<Test&...
代码星球 ·2021-02-19

查询多个字段,按一个字段排重

ifnotobject_id('Tempdb..#T')isnulldroptable#TGoCreatetable#T([ID]int,[Name]nvarchar(1),[Memo]nvarchar(2))Insert#Tselect1,N'A',N'A1'unionallselect2,N'A',N'A2'uni...