MySQL functions and operators

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

MySQL FUNCTIONS and OPERATORS

FUNCTIONS and OPERATORS

In the following section, we have given a list of FUNCTIONS and OPERATORS in MySQL as anyone can view the FUNCTIONS at a glance and jump immediately to his/her requirement.

MySQL Function & Operators

Description

Introduction of MySQL functions and operators

Types of MySQL functions and operators.

MySQL Comparison Functions and Operators

Some Comparison Functions and Operators are -

  • Between and
  • COALESCE()
  • NULL Safe equal to operator (<=>)
  • Equal operator(=)
  • Greater than or equal operator(>=)
  • Greater than operator(>)
  • GREATEST()
  • IN()
  • INTERVAL()
  • IS NOT NULL
  • IS NOT
  • IS NULL
  • IS
  • IS NULL()
  • LEAST()
  • LESS THAN OR EQUAL OPERATOR(<=)
  • LESS THAN OPERATOR(<)
  • LIKE
  • NOT BETWEEN AND
  • NOT EQUAL OPERATOR(<>,!=)
  • NOT IN()
  • NOT LIKE
  • STRCMP()

MySQL Logical Operators

MySQL logical AND operator compares two expressions and returns true if both of the expressions are true.
Some Logical Operators are -

  • And operator
  • Not operator
  • Or operator
  • Xor operator

MySQL Control Flow Functions

Some Control Flow Functions are -

  • Case operator
  • IF()
  • IFNULL()
  • NULLIF()

MySQL String Functions

Some String Functions in MySQL are -

  • ASCII
  • BIN
  • BIT_LENGTH
  • CHAR_LENGTH
  • CHAR
  • CHARACTER_LENGTH
  • CONCAT_WS
  • CONCAT
  • ELT
  • EXPORT_SET
  • FIELD
  • FIND_IN_SET
  • FORMAT
  • HEX
  • INSERT
  • INSTR
  • LCASE
  • LEFT
  • LENGTH
  • LIKE
  • LOAD_FILE
  • LOCATE
  • LOWER
  • LPAD
  • LTRIM
  • MAKE_SET
  • MID
  • NOT LIKE
  • NOT REGEXP
  • OCTET_LENGTH
  • ORD
  • POSITION
  • QUOTE
  • REGEXP
  • REPEAT
  • REPLACE
  • REVERSE
  • RIGHT
  • RLIKE
  • NOT RLIKE
  • RPAD
  • RTRIM
  • SOUNDEX
  • SOUNDS_LIKE
  • SPACE
  • STRCMP
  • SUBSTR
  • SUBSTRING_INDEX
  • SUBSTRING
  • TRIM
  • UCASE
  • UNHEX
  • UPPER

MySQL Mathematical Functions

Some Mathematical Functions in MySQL are -

  • ABS()
  • ACOS()
  • ASIN()
  • ATAN2()
  • ATAN()
  • CEIL()
  • CEILING()
  • CONV()
  • COS()
  • COT()
  • CRC32()
  • DEGREES()
  • DIV
  • DIVISION
  • EXP()
  • FLOOR()
  • LN()
  • LOG()
  • LOG2()
  • LOG10()
  • MOD()
  • OCT()
  • PI()
  • POW()
  • POWER()
  • RADIANS()
  • RAND()
  • ROUND()
  • SIGN()
  • SIN()
  • SQRT()
  • TAN()
  • TRUNCATE()
  • FORMAT()

MySQL Date and Time Functions

MySQL Date and Time Functions are used in various type of date and time operation.

MySQL Encryption and Compression Functions

MySQL Encryption and Compression Functions are used to encrypt and decrypt a string.
Some Encryption and Compression Functions in MySQL are -

  • AES_DECRYPT()
  • AES_ENCRYPT()
  • COMPRESS()
  • DECODE()
  • DES_DECRYPT()
  • DES_ENCRYPT()
  • ENCODE()
  • ENCRYPT()
  • MD5()
  • OLD_PASSWORD()
  • PASSWORD()
  • SHA1()
  • UNCOMPRESS()
  • UNCOMPRESSED_LENGTH()

MySQL Bit Functions

Some Bit Functions in MySQL are -

  • BIT_COUNT
  • BITWISE AND
  • INVERT BITS
  • BITWISE OR
  • BITWISE XOR
  • Left shift
  • Right shift

MySQL Information Functions

Some Information Functions in MySQL are -

  • BENCHMARK()
  • CHARSET()
  • COERCIBILITY()
  • COLLATION()
  • CONNECTION_ID()
  • CURRENT_USER(), CURRENT_USER
  • DATABASE()
  • FOUND_ROWS()
  • LAST_INSERT_ID()
  • SCHEMA()
  • SESSION_USER()
  • SYSTEM_USER()
  • USER()
  • VERSION()