Contents

?

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

기본적인 쿼리

select distinct * from 테이블명;


distinct * 이란건 한 행의 전체 칼럼값이 중복되는 데이터를 제거하고 뽑아냄..


예를 들어 중복된걸 제거한 제목을 뽑아 낼려면..

select distinct 제목 from 테이블명;;


전체 칼럼을 뽑아 내는데 중복된게 제목이 중복된건 하나만 출력하고 싶다면 index값이 있어야 함.

select * from 테이블명 where index in (select max(index) from 테이블명 group by 제목)


그리고 정렬은..

select * from 테이블명 where index in (select max(index) from 테이블명 group by 제목) order by 제목


만약 index값이 없다면 unique한 값으로 조건을 줘도 됨..



?

List of Articles
No. Category Subject Author Date Views
168 System/OS [linux] sendmail 설정/사용 hooni 2003.04.23 15424
167 System/OS [linux] DNS(Domain Name System) 설치, 설정 hooni 2003.04.23 13236
166 System/OS [linux] Masquerade 가상 ip분할기법 hooni 2003.04.23 48960
165 System/OS [linux] DHCP(Dynamic Host Configuration Protocol) 서버 hooni 2003.04.23 13738
164 System/OS [linux] 네트웍 트래픽 모니터링(MRTG) hooni 2003.04.23 47953
163 System/OS [linux] 커널 컴파일, 설정 hooni 2003.04.23 18625
162 System/OS [linux] 네트워크 커널 설정.. hooni 2003.04.23 17556
161 System/OS [linux] 최소한의 커널 설정(커널설치 전체과정) hooni 2003.04.23 18298
160 System/OS [linux] Xwindow/Xmanager 사용 hooni 2003.04.23 14390
159 System/OS [linux] ipchains 옵션 hooni 2003.04.23 14445
158 System/OS [linux] ipchains 사용예(패킷 필터링) hooni 2003.04.23 15014
157 System/OS [linux] ipfwadm를 이용한 패킷필터링(구버전) hooni 2003.04.23 13950
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 17 Next
/ 17