웹마스터 팁

/*문자 중복레코드 선택*/

SELECT so_no,so_subject,

count(*) as cnt

FROM snoopy

GROUP BY so_subject

HAVING count(so_no)>1;

 

/* 중복 레코드 삭제 */

DELETE

FROM snoopy

WHERE so_no not in (

SELECT so_no FROM (

SELECT so_no FROM snoopy GROUP BY so_subject

) as b

);