REPEAT() FUNCTION in MySQL

REPEAT() FUNCTION The MySQL REPEAT function is used to repeat a string a specified number of times. The various versions of MySQL support the REPEAT 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: REPEAT( string, number ) Parameters: string: It is used to … Read more

SUBSTRING() FUNCTION in MySQL

SUBSTRING() FUNCTION The MySQL SUBSTRING function is used to extract a substring from a string. The various versions of MySQL support the SUBSTRING 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 1: SUBSTRING( string, start_position, length ) Syntax 2: SUBSTRING( string FROM start_position … Read more

SUBSTR() FUNCTION in MySQL

SUBSTR() FUNCTION The MySQL SUBSTR function is used to extract a substring from a string. The various versions of MySQL support the SUBSTR function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0 and MySQL 4.1.1. Syntax 1: SUBSTR( string, start_position, length ) Syntax 2: SUBSTR( string FROM start_position FOR length ) Parameters: … Read more

MID() FUNCTION in MySQL

MID() FUNCTION The MySQL MID function is used to extract a substring from a string. The various versions of MySQL support the MID 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: MID( string, start_position, length ) Parameters: string: It is used to specify … Read more

RTRIM() FUNCTION in MySQL

RTRIM() FUNCTION The MySQL RTRIM function is used to remove all space characters from the right-hand side of a string. The various versions of MySQL support the RTRIM 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: RTRIM( string ) Parameters: string: It is … Read more

LTRIM() FUNCTION in MySQL

LTRIM() FUNCTION The MySQL LTRIM function is used to remove all space characters from the left-hand side of a string. The various versions of MySQL support the LTRIM 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: LTRIM( string ) Parameters: string: It is … Read more

RPAD() FUNCTION in MySQL

RPAD() FUNCTION The MySQL RPAD function is used to get a string that is right-padded with a specified string. This padding can also be limited to a certain length. The various versions of MySQL support the RPAD 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 … Read more

LPAD() FUNCTION in MySQL

LPAD() FUNCTION The MySQL LPAD function is used to get a string that is left-padded with a specified string. This padding can also be limited to a certain length. The various versions of MySQL support the LPAD 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 … Read more

POSITION() FUNCTION in MySQL

POSITION() FUNCTION The MySQL POSITION function is used to get the location of a substring in a string. The various versions of MySQL support the POSITION 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: POSITION( substring IN string ) Parameters: substring: It is … Read more

LOCATE() FUNCTION in MySQL

LOCATE() FUNCTION The MySQL LOCATE function is used to get the location of the first appearance of a substring in a string. The various versions of MySQL support the LOCATE 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: LOCATE( substring, string, start_position ) … Read more