--删除重复数据
delete from PMS_Contract_LeasedRoom where
LeasedRoomId not in
(select max(LeasedRoomId) from PMS_Contract_LeasedRoom group by ContractCode,RoomCode)
--having count(*)>1)
--删除重复数据
delete from PMS_Contract_LeasedRoom where
LeasedRoomId not in
(select max(LeasedRoomId) from PMS_Contract_LeasedRoom group by ContractCode,RoomCode)
--having count(*)>1)