MIN function returns the data with the minimum value in a column. This to obtain the minimum value in a column is:
Figure 1 below shows how the above SQL statement is used to obtain the smallest year number in the table students.
Figure 1: Output the minimum year number from table students using the SQL MIN function. |
Figure 2 below shows the SQL statement obtain the largest (Maximum value) student ID in the table students using MAX function.
Figure 2: Output the largest (Maximum Value) student ID in table students |