Search code snippets, questions, articles...

MIN() and MAX() functions in SQL

SELECT MIN(column_name) FROM table_name WHERE condition;

SELECT MAX(column_name) FROM table_name WHERE condition;
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place. Check how cool is the tool

MIN() function in SQL returns the smallest value from the selected column. MAX() function returns the largest value from the selected column.

Was this helpful?