CHARACTER_LENGTH() FUNCTION in MySQL

CHARACTER_LENGTH() FUNCTION The MySQL CHARACTER_LENGTH function is used to get the length of the character in the specified string. The various versions of MySQL support the CHARACTER_LENGTH function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0 and MySQL 3.23. Syntax: CHARACTER_LENGTH( string ) Parameters: Strong>string: It is used … Read more

CONCAT() FUNCTION in MySQL

CONCAT() FUNCTION The MySQL CONCAT function is used to concatenate two or more expressions together. The various versions of MySQL support the CONCAT function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0 and MySQL 3.23. Syntax: CONCAT( expr_1, expr_2, … expr_n ) Parameters: expr_1, expr_2, … expr_n: It … Read more

CONCAT_WS function in MySQL

CONCAT_WS() FUNCTION The MySQL CONCAT_WS function is used to concatenate two or more expressions together. It also allows to add a separator between each of the concatenated expressions. The various versions of MySQL support the CONCAT_WS function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0 and MySQL 3.23. … Read more

LOCALTIME() FUNCTION in MySQL

LOCALTIME() FUNCTION The MySQL LOCALTIME function is used to get the current date and time. The various versions of MySQL support the LOCALTIME function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0 and MySQL 3.23. Syntax: LOCALTIME( ) Example 1: mysql> SELECT LOCALTIME(); Output: ‘2019-07-05 15:30:20’ Explanation: The … Read more

LAST_DAY() FUNCTION in MySQL

LAST_DAY() FUNCTION The MySQL LAST_DAY function is used to get the last day of the month for a date or datetime value. The various versions of MySQL support the LAST_DAY function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0 and MySQL 4.1.1. Syntax: LAST_DAY( expression ) Parameters: expression: It is used to … Read more

CURRENT_TIMESTAMP() FUNCTION in MySQL

CURRENT_TIMESTAMP() FUNCTION The MySQL CURRENT_TIMESTAMP function is used to get the current date and time. The various versions of MySQL support the CURRENT_TIMESTAMP function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0 and MySQL 3.23. Syntax: CURRENT_TIMESTAMP( ) Example 1: mysql> SELECT CURRENT_TIMESTAMP(); Output: ‘2019-07-05 15:30:20’ Explanation: The … Read more

CURRENT_DATE() FUNCTION in MySQL

CURRENT_DATE() FUNCTION The MySQL CURRENT_DATE function is used to get the current date. The various versions of MySQL support the CURRENT_DATE function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0 and MySQL 3.23. Syntax: CURRENT_DATE( ) Example 1: mysql> SELECT CURRENT_DATE(); Output: ‘2019-07-05’ Explanation: The current date has … Read more

CURTIME() FUNCTION in MySQL

CURTIME() FUNCTION The MySQL CURTIME function is used to get the current time. The various versions of MySQL support the CURTIME function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0 and MySQL 3.23. Syntax: CURTIME( ) Example 1: mysql> SELECT CURTIME(); Output: ’15:30:20′ Explanation: The current time has … Read more

CURRENT_TIME() FUNCTION in MySQL

CURRENT_TIME() FUNCTION The MySQL CURRENT_TIME function is used to get the current time. The various versions of MySQL support the CURRENT_TIME function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0 and MySQL 3.23. Syntax: CURRENT_TIME( ) Example 1: mysql> SELECT CURRENT_TIME(); Output: ’15:30:20′ Explanation: The current time has … Read more

HOUR() FUNCTION in MySQL

HOUR() FUNCTION The MySQL HOUR function is used to extract the hour value from a date or datetime value. The various versions of MySQL support the HOUR function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0 and MySQL 3.23. Syntax: HOUR( expression ) Parameters: expression: It is used … Read more