FROM Sys.default_constraints a JOIN sys.columns b ON a.parent_object_id = b.object_id AND a.parent_column_id = b.column_id AND b.name = 'ISBNEnabled' where a.parent_object_id = OBJECT_ID('T_Kpa_eBayMonitor_Category') ) BEGIN ) SELECT @sysname = a.nam…
一:查询及删除重复记录的SQL语句1.查找表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断select * from peoplewhere peopleId in (select peopleId from people group by peopleId having count(peopleId) > 1)2.删除表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断,只留有rowid最小的记录delete from peoplewhere p…