REPLACE()

Documentation

VoltDB Home » Documentation » Using VoltDB

REPLACE()

REPLACE() — Returns a string replacing the specified substring of the original string with new text.

Synopsis

REPLACE( string, substring, replacement-string )

Description

The REPLACE() function returns a copy of the first argument, replacing all instances of the substring identified by the second argument with the third argument. If the substring is not found, no changes are made and a copy of the original string is returned.

Example

The following example uses the REPLACE function to update the Address column, replacing the string "Ceylon" with "Sri Lanka".

UPDATE Customers SET address=REPLACE( address,'Ceylon', 'Sri Lanka')
        WHERE address LIKE '%Ceylon%';