MySQL String Functions
Syntax | Description | Function | ||
| Returns text strings concatenated | CONCAT | ||
| Returns the location of a substring in a string. | INSTR | ||
| Returns the number of characters of the specified string expression. | LENGTH | ||
| Returns a character string after truncating all trailing blanks. | RTRIM | ||
| Returns a character expression after it removes leading blanks. | LTRIM | ||
| Replaces all occurrences of a specified string value with another string value. | REPLACE | ||
| Returns the reverse order of a string value. | REVERSE | ||
| Returns part of a text. | SUBSTR | ||
| Returns a character expression after converting uppercase character data to lowercase. | LOWER | ||
| Returns a character expression with lowercase character data converted to uppercase. | UPPER | ||
| Returns a string consisting of N spaces | SPACE |
MySQL Date Functions
Syntax | Description | Function | ||
| Returns a specified date with additional time values. | DATE_ADD | ||
| Returns an integer representing the day (day of the month) of the specified date. | DAYOFMONTH | ||
| Returns a date representing the last day of the month for specified date. | LAST_DAY | ||
| Returns the difference between two days, expressed as a value in days. | DATEDIFF | ||
| returns the number of months between two periods. | PREIOD_DIFF | ||
| Returns the current database system date. This value is derived from the operating system of the computer on which the instance of MySQL is running. | SYSDATE() |
MySQL Numeric Functions
Syntax | Description | Function | ||
| Returns an integer that is less than or equal to the specified numeric expression. | FLOOR | ||
| Returns an integer that is greater than, or equal to, the specified numeric expression. | CEIL | ||
| Returns a numeric value, rounded to the specified length or precision. | ROUND |
MySQL Conversion Functions
Syntax | Description | Function | ||
| Converts a a date into a string | DATE_FORMAT | ||
| Converts a number into a string | FORMAT | ||
| Used to convert one datatype into another, may be used to convert a string into a number | CONVERT |
MySQL NULL-Related Functions
Syntax | Description | Function | ||
| Accepts two arguments and returns the first if its not NULL | IFNULL |
No comments:
Post a Comment
It’s all about friendly conversation here at small review :) I’d love to be hear your thoughts!
Be sure to check back again because I do make every effort to reply to your comments here.