method One: Regexp_replace
Select T.achive_name,regexp_replace (T.achive_name, ' [^0-9] ') from T_archive_content t where t.plan_id= ' 402881ef5f702d62015f7128f2760089 ';
Tags: regexp_replace The parameter description of the regular function:
A total of 6 parameters, respectively, are
1. String to match
2. Regular expressions
3. Substituted characters
4, the identity starts from the first few characters regular expression matches. (Default is 1)
5. Identify the first few matching groups. (default to replace All)
6. Range of values:
Method Two: Regexp_substr
Select T.achive_name,regexp_substr (T.achive_name, ' [0-9]+ ') from T_archive_content t;
Method Three: TRANSLATE (' Pending replacement string ', ' 1234567890 ', ')
That is, replace the number in the string you want to replace with "'
Select T.achive_name,trim (TRANSLATE (T.achive_name, TRIM (TRANSLATE (t.achive_name, ' 1234567890 ', ")))
From T_archive_content T;
method Four: Intercept string substr (str,0,2)
Select T.achive_name,substr (t.achive_name,0,2) from T_archive_content t;
SUBSTR (String,start,length)
Parameters:
String-The specified string to intercept
Start-required to specify where the string begins
Positive number-starts at the specified position in the string
Negative number-starts at the specified position from the end of the string
0-Starts at the first character in a string
Length-optional, specifies the length of the string to intercept, by default returning all characters before the value of the character expression ends.
In the Oracle database, a field exists with Chinese characters and numbers, and the number part