SELECT * FROM (table name) GROUP BY (column name) HAVING count( * ) >=2
For deleteing
For deleting less id
DELETE n1 FROM (table name) n1, (table name) n2 WHERE n1.id < n2.id AND n1.(column name) = n2.(column name)
For deleting Greator id
DELETE n1 FROM (table name) n1, (table name) n2 WHERE n1.id > n2.id AND n1.(column name) = n2.(column name)
For deleteing
For deleting less id
DELETE n1 FROM (table name) n1, (table name) n2 WHERE n1.id < n2.id AND n1.(column name) = n2.(column name)
For deleting Greator id
DELETE n1 FROM (table name) n1, (table name) n2 WHERE n1.id > n2.id AND n1.(column name) = n2.(column name)
No comments:
Post a Comment