DB2 SQL: Finding Max and Min Values

To find the maximum and minimum values of a field, you can use the following SQL query:

SELECT MAX(column_name) AS max_value, MIN(column_name) AS min_value
FROM table_name;

In this SQL statement, column_name refers to the name of the field being queried, and table_name is the name of the table where the field is located. This query will return the maximum and minimum values of the specified field.

bannerAds