| | |
String functionsMySQL string functions we can use to manipulate data and derive useful information and analysis from the tables. These functions can be used along with update commands to change records or can be used to update multiple tables.
If you have a table of your newsletter subscribers and you want to know how many are using gmail then you have to work on the email address and extract the domain part from it. You may also like it see the all the email providers in a single list with number of subscribers. Such applications are possible by using mysql string functions.
We will discuss some of the string functions and develop some applications using them.
We can use concat string function to add any string to all the data ( or restrict the data by where clause ) present in a field.
We can use replace query to change a part of a string present ( or matching ) inside field.
We can search for presence of a substring inside a string field.
Left part of a string by using left function.
Padding string from left using LPAD function.
Inside a varchar field we can get a list of number of chars used by each data.
String reverse function in Mysql.
repeat function in Mysql.
Padding string from right using RPAD function in MySQL.
lcase & ucase string functions to change upper to lower and lower to upper case of the string data
We can use wildcard with LIKE command to match various patterns or combination of string data
We can use this function to take out a substring from a main string by using a delimiter and count.
| |
| |
|
|
|
|
|