oracle replace usage

Some data table data which is line feed or special characters, you want to get rid of, but thousands of records you want to change a section basically impossible. Then think of the replace function, are used as follows:

update Table 1 t set t. Column 1 = replace ((select column 1from Table 1 a where a. primary key column = t. the primary key column), char (10), '') 

replace function is used as follows:

Replace ( 'string to be changed,' 'is replaced string', 'replacement string')

例:select  replace ('asd','sd','aa') from dual;

Output: aaa

Guess you like

Origin www.cnblogs.com/w-wu/p/11684208.html