Contents

Views 3432 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print

MySQL에서는 Sub Query 가능한 버전이어야 함.


mysql> delete from tab where 번호 not in
    -> ( select min(번호) from tab group by 이름, 나이, 전화번호, 주소필드 );


위의 쿼리를 설명하자면..

번호를 제외한 나머지 컬럼들이 동일할때 번호에 대한 Min값을 구해서 Min이 아닌 번호를 가진 레코드들을 모두 삭제해 줌으로써 동일 정보에 대한 레코드를 제거하는 로직임.



?

List of Articles
No. Category Subject Author Date Views
9 Algorithm 암호 알고리즘 및 프로토콜의 이해.. file hooni 2013.04.23 17213
8 Algorithm 스터디 자료, 암호화에 대해서.. 나중에 볼 ppt.. file hooni 2013.04.23 13374
7 Algorithm 러시아 페인트공 알고리즘에 대해.. hooni 2013.04.23 22899
6 Algorithm 디피헬만(Diffie-Hellman) 초간단 개념.. hooni 2013.04.23 81022
5 Algorithm [security] 블럭 암호에 대해서.. hooni 2013.04.23 17121
4 Algorithm [security] RSA 암호화 설명과 예.. hooni 2013.04.23 16618
3 Algorithm [algorithm] Greedy (탐욕 기법) hooni 2003.04.23 15108
2 Algorithm Polynomial time 이란? ㅋㅋ hooni 2013.04.23 22691
1 Algorithm OCB5 Injection 앗싸뵹! ㅋㅋ file hooni 2014.07.01 807
Board Pagination Prev 1 Next
/ 1