sql remove characters from string code example
Example 1: sql query with replace function
UPDATE tableName
SET column_name = REPLACE(column_name, 'fromStringValue', 'toStringValue');
Update tbl_employee
Set designation = REPLACE(designation, 'SEO', 'Developer');
Example 2: sql remove characters from string right
SELECT TRIM(' Exemple ');
SELECT LTRIM(' Exemple ');
SELECT RTRIM(' Exemple ');
SELECT TRIM(BOTH 'x' FROM 'xxxExemplexxx');
SELECT TRIM(LEADING 'x' FROM 'xxxExemplexxx');
SELECT LTRIM('xxxExemplexxx', 'x');
SELECT TRIM(TRAILING 'x' FROM 'xxxExemplexxx');
SELECT RTRIM('xxxExemple', 'x');