Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8810735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:11:26+00:00 2026-06-14T03:11:26+00:00

I want to create a trigger, which updates a single node in my xml

  • 0

I want to create a trigger, which updates a single node in my xml file. I have a table with 2 rows, where one is the id of the entry and the other one is a xml type

drop table product_information_xml;
create table product_information_xml(
information_id Number(6,0),
products XMLType);

So, now one entry looks like this

"INFORMATION_ID"    "PRODUCTS"
5                  <products>
                       <product_id>1</product_id>
                       <product_name>samsung galaxy note</product_name>
                       <product_description>mobile phone</product_description>
                       <category_id>11</category_id>
                       <weight_class>2</weight_class>
                       <warranty_period>+000000000-06</warranty_period>
                       <supplier_id>102069</supplier_id>
                       <product_status>orderable</product_status>
                  <list_price>500</list_price>
                  <min_price>400</min_price>
                  <catalog_url>www.samsung.de</catalog_url>
              </products>

So now I have another table which isn’t xml. And has all XML tags as single columns. So the columns are product_id, product_description etc.

When I update the product_id how do I update the xml node <product_id> in the xml table? Can anybody help?

What I know yet is that I start with

Create or replace trigger delete_xml
after update on product_information
for each row
begin
update ?????
end;

Now I am stuck. I would love for help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T03:11:27+00:00Added an answer on June 14, 2026 at 3:11 am

    If you don’t know which node you’ll update, maybe it will be easyier for you to update the whole XMLTYPE-

    update product_information_xml
       set products = xmltype('<products><product_id>'||:new.product_id||'</product_id>'||
                       '<product_name>'|| :new.product_name||'</product_name>'||
                       '<product_description>'|| :new.product_description||'</product_description>'||
                       '<category_id>'|| :new.category_id||'</category_id>'||
                       '<weight_class>'|| :new.weight_class||'</weight_class>'||
                       '<warranty_period>'|| :new.warranty_period||'</warranty_period>'||
                       '<supplier_id>'|| :new.supplier_id||'</supplier_id>'||
                       '<product_status>'|| :new.product_status||'</product_status>'||
                       '<list_price>'|| :new.list_price||'</list_price>'||
                       '<min_price>'|| :new.min_price||'</min_price>'||
                       '<catalog_url>'|| :new.catalog_url||'</catalog_url></products>')
     where information_id = :new.information_id;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create an Update trigger which updates the values of column say
hi i have created a trigger which i want to update a table field
I want to create a trigger on a SQL Server table. Table has 8
I have tried to perform update on table which was trigger by update on
I have the following trigger which inserts records into Table B whenever Table A
we want to create a trigger which checks if a new measurement (=messung) point
I want create wordpress website into which I want create user management... That means
i want create image animation , i have 50 images with png format now
I want create module which update list of usb devices automatically (not only mass
I want to create a new field (or two) in my table that is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.