SQL – MySQL MID() Function
The MySQL MID() function extracts a substring from a string, starting at any position from the beginning or end of the string.
The MySQL MID() function extracts a substring from a string, starting at any position from the beginning or end of the string.
The MySQL MOD() function returns the remainder of a number divided by another number.
The MySQL MONTH() function returns the month part for a given date (a number from 1 to 12).
The MySQL MONTHNAME() function returns the name of the month for a given date.
The MySQL NOW() function returns the current date and time as “YYYY-MM-DD HH:MM:SS” (string) or as YYYYMMDDHHMMSS.uuuuuu (numeric).
The MySQL NULLIF() function compares two expressions and returns NULL if they are equal. Otherwise, the first expression is returned.
The MySQL PERIOD_ADD() function adds a specified number of months to a period and will return the result formatted as YYYYMM.
The MySQL PERIOD_DIFF() function returns the difference between two periods (both periods should be in the same format). The result will be in months.
The MySQL POSITION() function returns the position of the first occurrence of a case-insensitive substring in a string.
The MySQL POW() function returns the value of a number raised to the power of another number.
The MySQL POWER() function returns the value of a number raised to the power of another number.
The MySQL QUARTER() function returns the quarter of the year for a given date value (a number from 1 to 4).
The MySQL RADIANS() function converts a degree value (expressed as a positive or negative number) into radians.
The MySQL RAND() function returns a random number between 0 (inclusive) and 1 (exclusive).
The MySQL REPEAT() function repeats a string as many times as specified.
The MySQL REPLACE() function replaces all case-sensitive occurrences of a substring within a string, with a new substring.
The MySQL REVERSE() function reverses a string and returns the result.
The MySQL RIGHT() function extracts a number of characters from a string, starting from right.
The MySQL ROUND() function rounds a number to a specified number of decimal places.