mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-10-19 06:50:50 +00:00
16 lines
409 B
MySQL
16 lines
409 B
MySQL
|
DROP TABLE IF EXISTS test.replaceall;
|
||
|
CREATE TABLE test.replaceall (str FixedString(3)) ENGINE = Memory;
|
||
|
|
||
|
INSERT INTO test.replaceall VALUES ('foo');
|
||
|
INSERT INTO test.replaceall VALUES ('boa');
|
||
|
INSERT INTO test.replaceall VALUES ('bar');
|
||
|
INSERT INTO test.replaceall VALUES ('bao');
|
||
|
|
||
|
SELECT
|
||
|
str,
|
||
|
replaceAll(str, 'o', '*') AS replaced
|
||
|
FROM test.replaceall
|
||
|
ORDER BY str ASC;
|
||
|
|
||
|
DROP TABLE test.replaceall;
|