ODBC Server Reference Manual
CORE SQL Language
HP NonStop ODBC Server Reference Manual—429151-002
3-56
Examples
ALL/DISTINCT Clause
The ALL/DISTINCT clause of the SELECT statement specifies the columns to be 
included in the result of the query. The clause has the following syntax:
ALL or DISTINCT
specifies whether all rows or only distinct rows are to be included in the result of 
the query:
ALL is the default.
[ table-name.]*
retrieves all columns of a table or view. An asterisk (*) specifies all columns, in 
CREATE TABLE order.
[ table-name.]column-identifier
retrieves the specified columns in the order specified.
expression
is an expression. Expressions are described under Language Elements on 
page 3-2.
{ ALL } select-item [, select-item ] ...
{ DISTINCT }
select-item is:
 { [ table-name } *    
}
 { [ correlation-name}     
}
 {      
}
 { [ table-name  ]column-identifier [ as [column-alias ] ] 
}
  { [ correlation-name]     
}
 {      
}
 { expression [ as column-alias ]] 
}
 {      
}
ALL Include all rows of the result table
DISTINCT Include only unique rows of the result table. Duplicate rows are 
removed from the result table.










