database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
PostgreSQL
Firebird
Oracle
Informix
ㆍSybase
MS-SQL
DB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
Sybase Q&A 1231 게시물 읽기
No. 1231
distinct 에 대한 질문입니다.
작성자
보영
작성일
2005-07-22 16:07
조회수
5,589

오라클에서 중복되는 결과가 하나로 나오게 하려면 distinct 를 쓰잖아요.

 

사이베이스에서도 distinct 명령어가 적용되나요?

 

아니면 다른 명령어가 있는지 알려주세요~

이 글에 대한 댓글이 총 1건 있습니다.

이런거 함 보시면 어떨까요?

select au_fname, au_lname 
from authors 
where city = "Oakland"

Results of this query appear in columnar format:

au_fname        au_lname 
--------------  ----------- 
Marjorie        Green 
Dick            Straight 
Dirk            Stringer 
Stearns         MacFeather 
Livia           Karsen
 
(5 rows affected)

select syntax

The select syntax can be simpler or more complex than shown in the previous example. A simple select statement contains only the select clause; the from clause is almost always included, but is necessary only in select statements that retrieve data from tables. All other clauses, including the where clause, are optional. The full syntax of the select statement includes these phrases and keywords:

select [all | distinct] select_list 
     [into [[database.]owner.] table_name] 
     [from [[database.]owner.]{view_name|table_name           [(index {index_name | table_name} 
                 [parallel [degree_of_parallelism] ]
                 [prefetch size] [lru | mru])]}
           [holdlock | noholdlock] [shared]
     [,[[database.]owner.]{view_name|table_name           [(index {index_name | table_name} 
                 [parallel [degree_of_parallelism] ]
                 [prefetch size] [lru | mru])]}
           [holdlock | noholdlock] [shared]]...] 
 
     [where search_conditions] 
 
     [group by [all] aggregate_free_expression          [, aggregate_free_expression]...]
     [having search_conditions]
 
     [order by 
     {[[[database.]owner.]{table_name.|view_name.}] 
          column_name | select_list_number | expression} [asc | desc]
     [,{[[[database.]owner.]{table_name|view_name.}]           column_name | select_list_number | expression} 
               [asc | desc]]...]
 
     [compute row_aggregate(column_name)
                    [, row_aggregate(column_name)]...
          [by column_name [, column_name]...]] 
 
     [for {read only | update [of column_name_list]}]
 
     [at isolation {read uncommitted | read committed | serializable}]
 
     [for browse]
 
http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@Generic__BookView;pt=13332;lang=ko?DwebQuery=distinct
 
 
ANSI-compatible keyword synonyms

Current syntax

Additional syntax

commit tran, commit transaction rollback tran, rollback transaction

commit work rollback work

any

some

grant all

grant all privileges

revoke all

revoke all privileges

max (expression)

max ([all | distinct]) expression

min (expression)

min ([all | distinct]) expression

user_name() built-in function

user keyword

Treatment of nulls

석이님이 2005-07-23 00:00에 작성한 댓글입니다.
이 댓글은 2005-07-23 00:02에 마지막으로 수정되었습니다. Edit
[Top]
No.
제목
작성자
작성일
조회
1234outer join 시 에러.. [2]
류지준
2005-07-27
4898
1233LIKE 검색 질문입니다. [2]
헤로인
2005-07-25
3788
1232column_name 필드 리스트 값을 불러오고자 하는데.. [1]
이정기
2005-07-25
4294
1231distinct 에 대한 질문입니다. [1]
보영
2005-07-22
5589
1230sybase *.db 를 ms sql 2000 server에서 읽는 방법좀 알려주세요 [2]
윤동진
2005-07-22
4205
1229disk dsync 설정시 실제 OS 파일 버퍼를 사용하는지 여부를 알고싶습니다. [4]
호~기심만땅
2005-07-22
4390
1228chained 옵션을 영구적으로 설정할 수 없나요? [3]
왕처버
2005-07-20
3614
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.017초, 이곳 서비스는
	PostgreSQL v16.2로 자료를 관리합니다