오라클에서 중복되는 결과가 하나로 나오게 하려면 distinct 를 쓰잖아요.
사이베이스에서도 distinct 명령어가 적용되나요?
아니면 다른 명령어가 있는지 알려주세요~
이런거 함 보시면 어떨까요?
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)
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
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