MySQL String Functions

MySQL String Functions

MySQL has many built-in functions. They are very useful in manipulating string values from columns. Explore different MySQL String Functions on Concatly!

Articles

MySQL CHAR_LENGTH is an inbuilt function in MySQL. It returns the length of the input string by counting the number of characters. Also, it ignores whether the characters are single-byte or multi-bytes. It simply counts the number of characters. In this article, we will discuss the MySQL CHAR_LENGTH Function. Also, ...
Read More
MySQL CHARACTER_LENGTH is an inbuilt function in MySQL. It returns the length of the input string by counting the number of characters. Also, it ignores whether the characters are single-byte or multi-bytes. It simply counts the number of characters. In this article, we will discuss the MySQL CHARACTER_LENGTH Function. Note: ...
Read More
In this article, I will talk about the concatenation of two or more strings in MySQL using MySQL CONCAT Function. Concatenation, in the context of programming, is the operation of joining two strings together. The term"concatenation" literally means to merge two things together.https://techopedia.com MySQL provides two functions that concatenate string ...
Read More
We already saw in our previous post that how MySQL Concat function works. Now Concat function concatenates different column values of the same row. In order to concatenate the values of a particular column of different rows, you may use the MySQL group_concat Function. In this article, I will discuss ...
Read More
MySQL LCASE is an inbuilt Function in MySQL. It converts a text to lowercase in MySQL. In this article, we will discuss the MySQL LCASE Function. Also, we will discuss a few examples of using it. This function is synonymous to MySQL LOWER Function. Syntax LCASE (string) Parameters The Function ...
Read More
MySQL Left is an inbuilt function in MySQL. It extracts a number of characters from a string starting from the left. In this article, we will discuss the MySQL Left Function. Also, we will discuss a few examples of using it. Also, you can read about MySQL RIGHT Function. Syntax ...
Read More
MySQL LENGTH is an inbuilt function in MySQL. It returns the length of the input string according to a total number of bytes of the characters. Therefore, it does not ignore whether the characters are single-byte or multi-bytes. It counts a single byte character as 1 and a 2-byte character ...
Read More
MySQL Locate is an inbuilt function in MySQL. It returns the position of the first occurrence of a substring in a string. However, if the substring does not exist then it returns 0. Moreover, the function performs a case-insensitive search (uppercase and lowercase characters are the same). In this article, ...
Read More
MySQL LOWER is an inbuilt Function in MySQL. It converts a text to lowercase in MySQL. In this article, we will discuss the MySQL LOWER Function. Also, we will discuss a few examples of using it. This function is synonymous to MySQL LCASE Function. Syntax LOWER (string) Parameters The Function ...
Read More
MySQL LPAD is an inbuilt function in MySQL. It pads a string with specified characters on the left up to a given length. In this article, we will discuss the MySQL LPAD Function. Also, we will discuss a few examples of using it. You can also read about MySQL RPAD ...
Read More
LTRIM is an inbuilt Function in MySQL which removes unwanted leading spaces from a string in MySQL. Data present in tables might not always what we expect. There can be unwanted spaces leading the strings. LTRIM Function removes those unwanted spaces. In this article, we will discuss the MySQL LTRIM ...
Read More
MySQL MID is an inbuilt string Function in MySQL. It is used to extract a substring from a string. We will discuss the MySQL MID Function in this article. Also, we will discuss a few examples to demonstrate it's usage. Syntax MID(string, start, length) Parameters The MySQL MID Function need ...
Read More
MySQL Position is an inbuilt function in MySQL. It returns the position of the first occurrence of a substring in a string. However, if the substring does not exist then it returns 0. Moreover, the function performs a case-insensitive search (uppercase and lowercase characters are the same). In this article, ...
Read More
MySQL REPEAT is an inbuilt function in MySQL. It repeats a string for a specified number of times. Both the string and the number are the arguments to the function. In this article, we will discuss the MySQL REPEAT Function. Also, we will discuss a few examples of using it ...
Read More
MySQL provides a useful string function called Replace that allows you to replace a string in a column of a table by another. In this article, we will discuss the MySQL Replace Function which can replace all occurrences of a sub-string by a new sub-string in a string. Also, we ...
Read More
Reverse Function reverses a string and returns the result. It is an inbuilt Function which works from MySQL 4.0 onwards. In this article, we will discuss the MySQL Reverse Function. Also, we will discuss a few examples of using it. Syntax REVERSE (string) Parameters The Reverse expects only one parameter ...
Read More
MySQL Right is an inbuilt function in MySQL. It extracts a number of characters from a string starting from the right. In this article, we will discuss the MySQL Right Function. Also, we will discuss a few examples of using it. Also, you can read about MySQL LEFT Function. Syntax ...
Read More
MySQL RPAD is an inbuilt function in MySQL. It pads a string with specified characters on the right up to a given length. In this article, we will discuss the MySQL RPAD Function. Also, we will discuss a few examples of using it. You can also read about MySQL LPAD ...
Read More
RTRIM is an inbuilt Function in MySQL which removes unwanted trailing spaces from a string in MySQL. Data present in tables might not always what we expect. There can be unwanted spaces trailing the strings. RTRIM Function removes those unwanted spaces. In this article, we will discuss the MySQL RTRIM ...
Read More
MySQL SPACE is an inbuilt Function in MySQL. It returns a string containing a specified number of space characters. In this article, we will discuss the MySQL SPACE Function. Also, we will discuss a few examples of using it. Syntax SPACE (num_of_characters) Parameters The MySQL SPACE Function expects only one ...
Read More
MySQL STRCMP is an inbuilt Function in MySQL. It compares two strings and returns 0 if both of them are the same. Also, it returns -1 if the first string is smaller than the second and returns 1 on the other way round according to the sort order. In this ...
Read More
MySQL SUBSTR is an inbuilt string Function in MySQL. It is used to extract a substring from a string. We will discuss the MySQL SUBSTR Function in this article. Also, we will discuss a few examples to demonstrate it's usage. Syntax SUBSTR(string, start, length) Parameters The MySQL SUBSTR Function need ...
Read More
MySQL SUBSTRING is an inbuilt string Function in MySQL. It is used to extract a substring from a string. We will discuss the MySQL SUBSTRING Function in this article. Also, we will discuss a few examples to demonstrate it's usage. Syntax SUBSTRING(string, start, length) Parameters The MySQL Substring Function need ...
Read More
MySQL SUBSTRING_INDEX is an inbuilt Function in MySQL. It returns a substring before the number of occurrences of a delimiter. In this article, we will discuss the MySQL SUBSTRING_INDEX Function. Also, we will discuss a few examples of using it. Moreover, you can also go through MySQL Substring Function which ...
Read More
TRIM is an inbuilt Function in MySQL which removes unwanted leading and trailing characters from a string in MySQL. Data present in tables might not always what we expect. There can be unwanted characters or spaces leading or trailing in the strings. TRIM Function is used to remove those unwanted ...
Read More
MySQL UCASE is an inbuilt Function in MySQL. It converts a text to uppercase. In this article, we will discuss the MySQL UCASE Function. Also, we will discuss a few examples of using it. This function is synonymous to MySQL UPPER Function. Syntax UCASE (string) Parameters The Function expects only ...
Read More
MySQL UPPER is an inbuilt Function in MySQL. It converts a text to uppercase. In this article, we will discuss the MySQL UPPER Function. Also, we will discuss a few examples of using it. This function is synonymous to MySQL UCASE Function. Syntax UPPER (string) Parameters The Function expects only ...
Read More