The SQL DAY() function is used to get the day (an integer in the range of 1 to 31) from a date expression.
The SQL TRIM() function is used to remove the leading or trailing spaces of a string. Different databases have different writtings:
|SQL Server||LTRIM(), RTRIM()|
|MySQL||TRIM(), LTRIM(), RTRIM()|
In SQL Server or Oracle it doesn’t have Trim() function, we can combine LTrim() and RTrim():
The SQL SUM() function is used to get the total of a column or an expression.
The SQL NOW() function will return current date and time based on server system.
It is supported by MySQL, in MS SQL Server, the function getdate() will do the same thing, and in Oracle we can use SELECT SYSDATE FROM DUAL to get the current date and time.
The SQL LOWER, or SQL LCASE function is used to convert a string to lower case. In SQL Server, it uses the LOWER function.
The SQL UCASE, or SQL UPPER function is used to convert a string to upper case. In SQL Server, it uses the UPPER function.