Numeric Functions
1, the remainder function mod (x, y)
MoD (x, y) returns the remainder after X is removed by Y, and the MoD () also works for numbers with fractional parts, returning the exact remainder of the division operation.
2. Function truncate (x, y)
TRUNCATE (x, y) returns the number X that is removed to the Y-digit after the decimal point. If Y has a value of 0, the result does not have a decimal point or a fractional part.
If Y is set to a negative number, then the value of all lows after the beginning of the first Y-position of the decimal point is truncated (zeroed).
The Tips:round (x, y) function is rounded when the value is intercepted, and truncate (x, y) intercepts the value directly, not rounding
3, HEX (N)
Convert N to hex and return with string (n is bigint number, equivalent to Conv
(n,10,16))
Unhex is the inverse function of hex
character Functions
1, the Char_length (str) return value is the number of characters that the string STR contains. A multibyte character counts as a single character
2. Combine string function Concat_ws (x,s1,s2,...... )
Concat_ws (X,s1,s2,...... ), Concat_ws represents CONCAT with Separator, which is a special form of the CONCAT () function.
The first parameter, X, is the delimiter for the other parameters, where the delimiter position is placed between the two strings to be concatenated. The delimiter can be a string, or it can be a
Other parameters. If the delimiter is null, the result is null. The function ignores null values after any delimiter parameters.
3. INSERT (STR,POS,LEN,NEWSTR)
Returns a string str, a substring starting at position pos, and Len characters long substrings are replaced by string newstr
My MySQL Learning notes (iv)--functions