Scalar functions return a single value from an input value. These functions operate on individual values and return a result.
Both aggregate functions and scalar functions return a single value. Aggregate functions operate on many records, while scalar functions operate on each record independently.
Aggregate functions perform calculations on a set of values and return a single value. These functions are often used with the GROUP BY clause of the SELECT statement to group multiple rows together as input to form a single value output. Aggregate functions ignore NULL values, except for COUNT(*).
List of Scalar Functions:
1.UCASE()
2.LCASE()
3.MID()
4.LENGTH()
5.ROUND()
6.NOW()
7.FORMAT()
The UCASE() function converts the value of a string column to uppercase characters.
The LCASE() function converts the value of a string column to lowercase characters.
The MID() function extracts a substring from a column value of string type in a table.
The LENGTH() function returns the length of a string in the column.
The ROUND() function rounds a numeric column to the specified number of decimal places.
The NOW() function returns the current system date and time.
The FORMAT() function formats how a column is to be displayed.
This corrected version addresses spelling mistakes, grammar mistakes, and conceptual errors, providing a clear and accurate explanation of SQL scalar functions and their usage.