Mentor SAP

HAVING Clause

The HAVING addition restricts the number of groups of combined results in the result set by using a logical expression (HAVING <sql_cond>) for these rows.

 

The syntax of the sql_cond logical expression is similar to the syntax of the logical expression of the WHERE condition. The comparisons of the logical expression evaluate the contents of row groups.

 

 

ORDER BY

The ORDER BY addition sorts the result set on the basis of the contents of the entered columns. For all columns not listed after ORDER BY, the order in the result set is undefined, and can be different if the same SELECT statement is executed more than once.