Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

Max() and Min() function in MS Access

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

1. Max() Function :
max() function return the maximum value of given set. In the function a query is passed and in the eligible records which value will be maximum that will return as result. A expression will be pass as parameter and it will return the maximum value in the expression.

Syntax :

Max (expression)

Demo Database for example :

Table name : student

student_idMarks
12156
12245
12389
12450

Example-1 :

SELECT Max(Marks) AS marks 
FROM student;

Output –

marks
89

Example-2 :

SELECT Max(Marks) AS marks 
FROM student
where Marks<80;

Output –

marks
56

2. Min() Function :
min() function works like max() function but it will return the minimum value of the expression. In this function a query will be passed as parameter and it will return the minimum record.

Syntax :

 Min(expression)

Example-1 :

SELECT Min(Marks) AS marks 
FROM student;

Output –

marks
45

Example-2 :

SELECT Min(Marks) AS marks 
FROM student
where Marks>50;

Output –

marks
56
My Personal Notes arrow_drop_up
Last Updated : 02 Sep, 2020
Like Article
Save Article
Similar Reads