, SQL . , , - , , .
UPDATE
, , , , . SQL, MySQL, , , (property1, property2, property3). , . :
delete from SomeTable st1
where someID not in (
select min(st2.someId)
from SomeTable st2
group by property1, property2, property3
)
min(), someId . :
delete from SomeTable st1
where someID in (
select st3.someId
from SomeTable st2
join SomeTable st3
on st2.property1 = st3.property1
and st2.property2 = st3.property2
and st2.property3 = st3.property3
where st2.someId < st3.someId
)
. , , NOT IN . , , , , , (, (property1, property2, property3)) .
Core Data, , , . Core Data , Core Data, , , . , . SO.
, , Core Data , , , . ORM, Core Data. , , ORM.
. SomeTable(property1, property2, property3) , , () .