MariaDB provides various functions that allow us to manipulate strings of characters. Here’s how to use some of these string functions:
1. LENGTH: This function returns the length of the string. For example:
\`\`\` SELECT LENGTH; \`\`\`1. CONCAT: This function is used to concatenate two or more strings together. For example:
\`\`\` SELECT CONCAT; \`\`\`1. SUBSTRING: This function is used to extract a substring from a string. ‘start’ is the position to start from and ‘length’ is the number of characters to retrieve. For example:
\`\`\` SELECT SUBSTRING; \`\`\`1. REPLACE: This function is used to replace all occurrences of a substring ‘from_str’ with the string ‘to_str’. For example:
\`\`\` SELECT REPLACE; \`\`\`1. UPPER and LOWER: These functions change the case of the string to upper case and lower case respectively. For example:
\`\`\` SELECT UPPER; SELECT LOWER; \`\`\`1. TRIM: This function removes leading and trailing spaces from a string. For example:
\`\`\` SELECT TRIM; \`\`\`You can execute these queries using a MariaDB client by connecting to a MariaDB server. If the MariaDB server is running locally, for example, you could use the `mysql` command line client.