标签:highlight csharp nbsp HERE max rom select sharp pre
如果表中有ID
SELECT * FROM dbo.tblMainUser WHERE ID NOT IN (SELECT MAX(ID) FROM tblMainUser GROUP BY UserName,pwd)
如果表中没有自增ID
SELECT IDENTITY(INT,1,1) AS id,* INTO #temp FROM TblTest1 SELECT *FROM #temp WHERE id in( SELECT MAX(id)FROM #temp GROUP BY UserName,Pwd HAVING count(*)>1 )
标签:highlight csharp nbsp HERE max rom select sharp pre
原文地址:https://www.cnblogs.com/TieJing/p/11734229.html