How to store and extract XML data in and from an Oracle DataBase (DB)

Here are some snippets of code showing how to accomplish this: CREATE TABLE SampleTable (id number primary key, person XMLType) This first example creates a table with only two columns: id and person. The first is the PK of the table and the second is of XMLType type. The latter is going to contain our XML data. Now let’s insert one row in the table. INSERT INTO SampleTable VALUES (1, XMLType('XMLString')) Where you must replace XMLString with any string representing XML.