Difference between revisions of "SQL MAX()"

From Lianjapedia
Jump to: navigation, search
Line 4: Line 4:
 
==Syntax==
 
==Syntax==
 
MAX(<expr>)
 
MAX(<expr>)
 
  
 
==See Also==
 
==See Also==
 
[[SQL Aggregate Functions|AGGREGATES]], [[AVG()]], [[COUNT()]], [[SQL MIN()|MIN()]], [[SQL SELECT|SELECT]], [[SUM()]]
 
[[SQL Aggregate Functions|AGGREGATES]], [[AVG()]], [[COUNT()]], [[SQL MIN()|MIN()]], [[SQL SELECT|SELECT]], [[SUM()]]
  
 
+
==Description==
Description
+
 
Returns the maximum value of <expr>.  The <expr> can be a numeric or date expression.
 
Returns the maximum value of <expr>.  The <expr> can be a numeric or date expression.
 
  
 
==Example==
 
==Example==
Line 19: Line 16:
 
</code>
 
</code>
  
 
==Products==
 
Recital, Recital Server
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:SQL|MAX()]]
 
[[Category:SQL|MAX()]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:SQL Functions]]
 
[[Category:SQL Functions]]

Revision as of 08:07, 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