I am trying to replace all the 'abc' in column1 with blanks but received this error. Help will be appreciated!
SELECT *
REPLACE(column1, 'abc', '')
FROM database.table;
I am trying to replace all the 'abc' in column1 with blanks but received this error. Help will be appreciated!
SELECT *
REPLACE(column1, 'abc', '')
FROM database.table;
Assuming reserved words are only illustrative then following should work ref:
SELECT *, REPLACE(column1,'abc','') FROM database.table;
As @Sloan Thrasher observed you have missed a comma to separate the columns. If the reserved words really are used you need to put them in backticks or you will get a syntax error see SO discussion. So the query would become:
SELECT *, REPLACE(column1,'abc','') FROM `database`.`table`;
Try the below:
UPDATE database.table SET column1 = REPLACE(column1, 'abc', '');