Difference between revisions of "SQL MAX()"

From Lianjapedia
Jump to: navigation, search
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Returns a maximum value in a SELECT statement
 
Returns a maximum value in a SELECT statement
 
  
 
==Syntax==
 
==Syntax==

Revision as of 08:06, 7 December 2012

Purpose

Returns a maximum value in a SELECT statement

Syntax

MAX(<expr>)


See Also

AGGREGATES, AVG(), COUNT(), MIN(), SELECT, SUM()


Description Returns the maximum value of <expr>. The <expr> can be a numeric or date expression.


Example

SELECT MAX(sal) Maximum FROM accounts


Products

Recital, Recital Server