To return or fetch the smallest values from the selected column, the MIN() function is used.

 

SQL MIN() Syntax is as follows:

Select Min(column_name)

From table_name;

 

Let us consider the below Students table:

roll_no

name

total_marks

(out of 600)

percentage

grade

1

Ashok

392

65.33

B

2

Chaitali

454

75.67

A

3

Smriti

502

83.60

A

4

Kaushik

337

56.10

C

 

Now suppose based on the above table you want to fetch minimum value of total marks, then you can do so simply using the following command:

Select Min(total_marks)

Form Students;

 

The result will be as follows:

MIN(total_marks)

337

1 row in set (0.00 sec)