- 论坛徽章:
- 0
|
Chapter 23
Commands: select - setuser
select
Description
Retrieves rows from database objects.
Syntax
select ::=
select [ all | distinct ] select_list
[into_clause ]
[from_clause ]
[where_clause ]
[group_by_clause]
[having_clause ]
[order_by_clause ]
[compute_clause ]
[read_only_clause ]
[isolation_clause ]
[browse_clause ]
[plan_clause ]
select_list ::=
For details on select_list, see the parameters description.
into_clause ::=
into [[database.]owner.]table_name
[ lock {datarows | datapages | allpages } ]
[ with into_ option [, into_ option] ...]
into_option ::=
| max_rows_per_page = num_rows
| exp_row_size = num_bytes
| reservepagegap = num_pages | identity_gap = gap
[existing table table_name]
[[external type] at "path_name"
[column delimiter delimiter]]
from_clause ::=
from table_reference [,table_reference]...
table_reference ::= table_view_name | ANSI_join
table_view_name ::=
[[database.]owner.] {{table_name | view_name}
[as] [correlation_name]
[index {index_name | table_name }]
[parallel [degree_of_parallelism]]
[prefetch size ][lru | mru]}
[holdlock | noholdlock]
[readpast]
[shared]
ANSI_join ::=
table_reference join_type join table_reference join_conditions join_type
::= inner | left [outer] | right [outer] join_conditions ::= on search_conditions
where_clause ::=
where search_conditions
group_by_clause ::=
group by [all] aggregate_free_expression
[, aggregate_free_expression]...
having_clause ::=
having search_conditions
order_by_clause ::=
order by sort_clause [, sort_clause]...
sort_clause ::=
{ [[[database.]owner.]{table_name.|view_name.}]column_name
| select_list_number
| expression
}
[asc | desc]
compute_clause ::=
compute row_aggregate(column_name)
[, row_aggregate(column_name)]...
[by column_name [, column_name]...]
read_only_clause ::=
for {read only | update [of column_name_list]}
isolation_clause ::=
at isolation
{ read uncommitted | 0 }
| { read committed | 1 }
| { repeatable read | 2 }
| { serializable | 3 }
browse_clause ::=
for browse
plan_clause ::=
plan "abstract plan" |
|