oracle更新xml节点问题的一些细节

时间:2022-11-03 11:36:05

有的节点是<emali/>这样的,所以直接

  1. update table1 e set e.xxx_xml=updatexml(e.xxx_xml,'/data/contact/email/text()'
  2. 'value' 
  3. where 1=1; 

是不能更新的

  1. update table1 e set e.xxx_xml=updatexml(e.xxx_xml,'/data/contact/email'
  2. '<email>'|| 'value' || '<email/>' 
  3. where 1=1; 

这样就能更新了