V
V
Victor L2021-10-15 13:11:16
SQL
Victor L, 2021-10-15 13:11:16

How to delete a node in a table in a field with xml without specifying a path?

There is a table that stores xml

CREATE TABLE T2(id int primary key, Context xml) 

insert into T2 values
(1,'<root>
  <context>
   <alfa>
     <ul></ul>
     <mail>[email protected]</mail>
   </alfa>
    <betta>
     <ul></ul>
    <mail>[email protected]</mail>
    </betta>
  </context>
</root>')
select * from T2;

Is it possible to somehow `drop` everything <mail>[email protected]</mail>
without specifying the path to the element?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question