Select id, objectname from [ax_molniya].[dbo].[www_reindex_tablename]  where objectname in (
Select objectname from [ax_molniya].[dbo].[www_reindex_tablename] Group by objectname having Count(*) >1)
Delete from t from [ax_molniya].[dbo].[www_reindex_tablename]  t, [ax_molniya].[dbo].[www_reindex_tablename]  v
where t.objectname = v.objectname
and t.id > v.id

 

Добавить комментарий

Навигация по записям