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
22 System/OS [linux] 간단한 vi편집기 사용 명령 hooni 2003.04.23 13541
21 System/OS [linux] 기본 명령어 (내공쌓기) hooni 2003.04.23 14387
20 System/OS [linux] 리눅스 활용 팁^^ hooni 2003.04.23 14693
19 System/OS [linux] vi 편집기 간단한 명령과 환경설정 hooni 2003.04.23 11409
18 System/OS [perl] 펄 환경 설정해야 할거 ㅋㅋ hooni 2003.04.23 15054
17 System/OS 컴파일러 수업 자료(교재 : 컴파일러 입문) file hooni 2003.04.23 22080
16 System/OS asx미디어 정보 기록.. hooni 2003.04.23 20612
15 System/OS [linux] 쉘 스크립트에 대한 설명과 예제.. hooni 2003.04.23 13474
14 System/OS [linux] 쉘 스크립트 (Shell Script) hooni 2003.04.23 12123
13 System/OS [unix] 유닉스 csh에서 환경변수 등록 hooni 2003.04.23 11758
12 System/OS [linux] ProFTPD 타임아웃 설정 hooni 2003.04.23 12914
11 System/OS [unix] SUN Solaris 싱글모드.. ㅡ,.ㅡ; hooni 2003.04.23 12062
Board Pagination Prev 1 ... 8 9 10 11 12 13 14 15 16 17 Next
/ 17