Scalar_Functions
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()
1.UCASE() Function
The UCASE() function converts the value of a string column to uppercase characters.
2. LCASE() Function
The LCASE() function converts the value of a string column to lowercase characters.
3. MID() Function
The MID() function extracts a substring from a column value of string type in a table.
4. LENGTH() Function
The LENGTH() function returns the length of a string in the column.
5. ROUND() Function
The ROUND() function rounds a numeric column to the specified number of decimal places.
4. NOW() Function
The NOW() function returns the current system date and time.
5. FORMAT() Function
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.