天天看點

測試常用sql語句----初級

1.删除重複,保留一條groupID最小那一天

delete * from [Metadata_ForGZBB].[dbo].[Group] where groupID<>(select MIN(groupID) from [Metadata_ForGZBB].[dbo].[Group] a where a.groupName='S送水泵房總站') and groupName='S送水泵房總站'