LARGE
Example
Section titled “Example”CREATE TABLE Employees ( ID int, Salary int);
INSERT INTO Employees (ID, Salary)VALUES (1, 5000), (2, 3000), (3, 4500), (4, 6000), (5, 10000);
SELECT MAX(Salary) AS Largest_Salary FROM Employees;Output
Section titled “Output”Largest_Salary10000Explanation
Section titled “Explanation”The SQL query above first creates an ‘Employees’ table with ‘ID’ and ‘Salary’ as columns. It then inserts 5 records into the table. The MAX function is finally used to find the largest salary, which in this case is 10000.
Example
Section titled “Example”SELECT MAX(Size) AS LargestSizeFROM Products;Output
Section titled “Output”LargestSize----------3500Explanation
Section titled “Explanation”This SQL code retrieves the largest Size value from the Products table, using the MAX function to find the maximum value within the Size column.
Example
Section titled “Example”SELECT MAX(Salary) AS LargestSalaryFROM Employees;Output
Section titled “Output”LARGESTSALARY-------------50000Explanation
Section titled “Explanation”In this example, we use the Oracle SQL MAX() function to find the highest number in the Salary column of the Employees table. The column alias LargestSalary is used for the returned value. The largest value in the Salary column is returned as the result.