Functions are keywords in SQL used to manipulate values in database for output purposes. A function is a command normally used together with a column name that processes the data to produce an output. SQL contains several types of functions. SQL Aggregate functions can perform useful functions such as COUNT, SUM, AVG, MAX, MIN.
SQL Max is used to find the maximum value in a certain column in a table. In my example, I have the
SALES table below with records.
Syntax SQL MAX
select MAX(column_name) from table_name
SALES Table
To display
60.00 which is the maximum amount found in the total column, you need the following SQL Max function.
Syntax SQL MAX
select MAX(total) from sales
Thank you for visiting and hope this helps you. Feel free to leave a comment below for any questions. I got some other articles related to php and mysql here in my blog. Watch out for more upcoming tutorials related to blogging and programming. Good day! ^_^
SQL SERVER MAX: Display the Maximum Number in Column
No comments:
Post a Comment