MySQL
MySQL Common MySQL Returns the current schema name schema () Returns the current database name database () Returns the authenticated used name current_user () Return the user name returned by the client session_user () Return the user name returned by the client system_user () ascii ( string_expression ) Returns a number representing the ASCII code value of the leftmost character of "string_expression"; for example, ascii ( 'A' ) is 65. Returns the string value of the database version. version ()
MySQL String instr ( string_expression1 , string_expression2 [ , integer_expression1 [ , integer_expression2 ] ] ) Searches "string_expression1" starting at position "integer_expression1" for the "integer_expression2" occurrence of "string_expression2". If "integer_expression1" is negative, then the search is backwards from the end of "string_expression1". Returns an integer indicating the position of "string_expression2". lpad ( string_expression1 , integer_expression [ , string_expression2 ] ) Returns "string_expression1" padded to length "integer_expression" with occurrences of "string_expression2". If "string_expression1" is longer than "integer_expression", the appropriate portion of "string_expression1" is returned. ltrim ( string_expression1 [ , string_expression2 ] ) Returns "string_expression1", with leading characters removed up to the first character not in "string_expression2"; for example, ltrim ( 'xyxXxyAB' , 'xy' ) returns XxyAB. Returns the hexadecimal string representation of "numeric_expression1". hex ( numeric_expression1 ) repeat ( string_expression , numeric_expression1 ) Returns the "string_expression" repeated "numeric_expression1" times. replace ( string_expression , string_expression2 , string_expression3 ) Returns "string_expression" having replaced "string_expression2" with "string_expression3". reverse ( string_expression ) Returns "string_expression" reversed. right ( string_expression1 , numeric_expression ) Returns the rightmost "numeric_expression" characters from "string_expression1". rpad ( string_expression1 , integer_expression [ , string_expression2 ] ) Returns "string_expression1" right-padded to length "integer_expression" with occurrences of "string_expression2". If "string_expression1" is longer than "integer_expression", the appropriate portion of "string_expression1" is returned. If "string_expression2" is not specified, then spaces are used. rtrim ( string_expression1 [ , string_expression2 ] ) Returns "string_expression1", with final characters removed after the last character not in "string_expression2"; for example, rtrim ( 'ABxXxyx' , 'xy' ) returns ABxX. If "string_expression2" is not specified, the final space characters are removed. soundex ( string_expression1 ) Returns a soundex string of "string_expression1".
MySQL Math log ( numeric_expression ) Returns the base 10 logarithm of "numeric_expression1" or logarithm to the base "numeric_expression2". ln ( numeric_expression ) Returns the natural logarithm of "numeric_expression1". pi () Returns the constant of pi.
MySQL Trigonometry acos ( numeric_expression ) Returns the arccosine of "numeric_expression" in radians. The arccosine is the angle whose cosine is "numeric_expression". asin ( numeric_expression ) Returns the arcsine of "numeric_expression" in radians. The arcsine is the angle whose sine is "numeric_expression". atan ( numeric_expression ) Returns the arctangent of "numeric_expression" in radians. The arctangent is the angle whose tangent is "numeric_expression". atan2 ( numeric_expression1 ,numeric_expression2 ) Returns the arctangent of the x and y coordinates specified by "numeric_expression1" and "numeric_expression2", respectively, in radians. The arctangent is the angle whose tangent is "numeric_expression2" / "numeric_expression1". cos ( numeric_expression ) Returns the cosine of "numeric_expression" where "numeric_expression" is an angle expressed in radians. cot ( numeric_expression ) Returns the cotangent of "numeric_expression" where "numeric_expression" is an angle expressed in radians. sin ( numeric_expression ) Returns the sine of "numeric_expression" where "numeric_expression" is an angle expressed in radians. tan ( numeric_expression ) Returns the tangent of "numeric_expression" where "numeric_expression" is an angle expressed in radians. degrees ( numeric_expression ) Returns the degrees where "numeric_expression" is an angle expressed in radians. radians ( numeric_expression ) Returns the radians where "numeric_expression" is an angle expressed in degrees.