Home > database >  Db2 to remove all brackets on the surface of the table
Db2 to remove all brackets on the surface of the table

Time:10-04

There is a table in db2, the table name firm

Path field in some such records in the table

192.168.10.1 (echo), 192.168.1.21
192.168.10.2
192.168.10.1 (echo)
192.168.10.1 (echo), 192.168.1.21 (ech1), 192.168.1.22

Requirements:
Remove the tape in this field the inside of the parentheses contents of brackets, parentheses and the content of the inside of the parentheses are removed, only keep address,
Online, wait, the great god,

CodePudding user response:

Update the firm set path=replace (path, '(echo)', ');
Update the firm set path=replace (path, '(echo1)', ');
  •  Tags:  
  • DB2
  • Related