Turn from: http://www.jb51.net/article/53576.htm
The actual examples are as follows:
Update Sys_dictionary_bak Set display_name = Trim (display_name)
where Table_name= ' T_guardian '
and Column_name= ' Zy '
;
Extended:
such as trim (' character 1 ' from ' String 2 '), character 1 can only be a single character.
1. Trim () deletes the spaces on either side of the string.
2. LTrim () deletes the space to the left of the string.
3. RTrim () deletes the space to the right of the string.
4. Trim (' character 1 ' from ' String 2 ') starts from both sides of the character 2 string, and deletes the specified character 1.
5. Trim ([leading | trailing | both] Trim_char from string) deletes the specified character Trim_char from string strings.
Leading: Deletes from the header of the string.
Trailing: Deletes from the tail of the string.
Borth: Delete from both sides of the string.
6. Tim () can only remove half-width spaces.
For example:
Trim (' tech ') would return ' tech ';
Trim (' from ' tech ') would return ' tech ';
Trim (Leading ' 0 ' 000123 ') would return ' 123 ';
Trim (trailing ' 1 ' Tech1 ') would return ' Tech ';
Trim (both ' 1 ' 123tech111 ') would return ' 23Tech ';
Description
Where the Sys_dictionary_bak table is defined as:
CREATE TABLE "SCOTT". " Sys_dictionary_bak "
("pk_id" number (10,0) not NULL ENABLE,
"table_name" NVARCHAR2 (100),
"column_name" NVARCHAR2 (100),
"VALUE" NVARCHAR2 (100),
"Display_name" NVARCHAR2 (100),
"By" number (10,0),
"MEMO" NVARCHAR2 (512),
"Create_time" char (char),
"Update_time" char (char),
"DR" Number (3,0)
) SEGMENT Creation IMMEDIATE
PCTFREE pctused Initrans 1 Maxtrans 255 nocompress LOGGING
STORAGE (INITIAL 65536 NEXT 1048576 minextents 1 maxextents 2147483645
Pctincrease 0 freelists 1 freelist GROUPS 1 buffer_pool default Flash_cache default Cell_flash_cache default)
Tablespace "USERS";
ALTER TABLE "SCOTT". " Sys_dictionary_bak "MODIFY (" pk_id "not NULL ENABLE);